Skip to content

Instantly share code, notes, and snippets.

@jzaeske
jzaeske / animation.js
Created Jun 2, 2016
animate js-sequence-diagrams in reveal.js
View animation.js
function initDiagram(selector) {
// draw diagram. selector is the html element containing the diagram description
$(selector).sequenceDiagram({theme: 'hand'});
// get width and height to set the viewBox Attribute. this is needed to resize the svg via css
var w = $(selector + " svg").attr("width");
var h = $(selector + " svg").attr("height");
$(selector + " svg").attr('id', selector + "-id");
var svg = document.getElementById(selector + "-id");
svg.setAttribute("viewBox","0 0 " + w + " " + h);
View keybase.md

Keybase proof

I hereby claim:

  • I am jzaeske on github.
  • I am tagkaffee (https://keybase.io/tagkaffee) on keybase.
  • I have a public key ASBp_M2bazMZPFjRIZsAt8y0N8_A4E-jpBJSRycDsKANCwo

To claim this, I am signing this object:

You can’t perform that action at this time.