Skip to content

Instantly share code, notes, and snippets.

export class Rect {
#w; // width
#h; // height
#x; // x position
#y; // y position
#a; // rotation angle
constructor(o) {
let {w=0, h=0, x=0, y=0, a=0} = o || {};
@bronkula
bronkula / index.html
Created April 21, 2018 17:20
Scrubber Timeline
<div class="timeline timeline1">
<div class="scrubber" data-offset="0">
<div class="title"></div>
</div>
</div>
<div class="description">
</div>
<hr>
@bronkula
bronkula / getsvg.js
Last active November 17, 2016 05:56
Replace all <i data-src> elements with svg code from an svg file. Requires jQuery.
$("i[data-src]").each(function(){
var obj=$(this);$.ajax({url:obj.data("src")}).done(function(d){ obj.replaceWith($("<i class='icon'>").html($(d).find("svg"))); });
});