MCPcopy
hub / github.com/methodofaction/Method-Draw / getOffset

Function getOffset

src/js/svgcanvas.js:612–619  ·  view source on GitHub ↗
(elem)

Source from the content-addressed store, hash-verified

610
611 // FIXME: same re-creation problem with this function as getCheckedBBox() above
612 var getOffset = function(elem) {
613 var sw = elem.getAttribute("stroke-width");
614 var offset = 0;
615 if (elem.getAttribute("stroke") != "none" && !isNaN(sw)) {
616 offset += sw/2;
617 }
618 return offset;
619 }
620 var bboxes = [];
621 $.each(elems, function(i, elem) {
622 var cur_bb = getCheckedBBox(elem);

Callers 1

svgcanvas.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected