Lines Matching refs:svg

5     var defs = instance.svg.querySelector('defs')
8 instance.svg.appendChild(defs)
29 instance.svg.appendChild(zoomGroup)
200 var SvgPanZoom = function(svg, options) {
201 this.init(svg, options)
220 SvgPanZoom.prototype.init = function(svg, options) {
221 this.svg = svg
230 var dimensions = SvgUtils.getSvgDimensions(svg)
235 this.viewport = SvgUtils.getOrCreateViewport(svg)
249 SvgUtils.setupSvgAttributes(this.svg)
267 var svgViewBox = this.svg.getAttribute('viewBox')
270 this.svg.removeAttribute('viewBox')
286 this.svg.removeAttribute('viewBox')
310 var svgViewBox = this.svg.getAttribute('viewBox')
351 this.svg.addEventListener("mousedown", function(evt) {
354 this.svg.addEventListener("touchstart", function(evt) {
359 this.svg.addEventListener("mouseup", function(evt) {
362 this.svg.addEventListener("touchend", function(evt) {
367 this.svg.addEventListener("mousemove", function(evt) {
370 this.svg.addEventListener("touchmove", function(evt) {
375 this.svg.addEventListener("mouseleave", function(evt) {
378 this.svg.addEventListener("touchleave", function(evt) {
381 this.svg.addEventListener("touchcancel", function(evt) {
386 window.addWheelListener(this.svg, function(evt) {
428 …var svg = (evt.target.tagName === 'svg' || evt.target.tagName === 'SVG') ? evt.target : evt.target…
429 , relativeMousePoint = SvgUtils.getRelativeMousePoint(svg, evt)
432 this.zoomAtPoint(svg, relativeMousePoint, zoom)
445 SvgPanZoom.prototype.zoomAtPoint = function(svg, point, zoomScale, zoomAbsolute) {
454 …var k = svg.createSVGMatrix().translate(point.x, point.y).scale(zoomScale).translate(-point.x, -po…
485 var _point = this.svg.createSVGPoint()
494 this.zoomAtPoint(this.svg, point, scale, absolute)
530 …var svg = (evt.target.tagName === 'svg' || evt.target.tagName === 'SVG') ? evt.target : evt.target…
555 …SvgUtils.setCTM(this.stateTarget, svg.createSVGMatrix().translate(point.x - this.stateOrigin.x, po…
569 …, svg = (target.tagName === 'svg' || target.tagName === 'SVG') ? target : target.ownerSVGElement |…
594 var point = SvgUtils.getRelativeMousePoint(svg, evt)
595 this.zoomAtPoint(svg, point, zoomFactor)
615 …var svg = (evt.target.tagName === 'svg' || evt.target.tagName === 'SVG') ? evt.target : evt.target…
643 …var svg = (evt.target.tagName === 'svg' || evt.target.tagName === 'SVG') ? evt.target : evt.target…
802 that.zoomAtPoint(that.svg, SvgUtils.getSvgCenterPoint(that.svg), scale, true)
805 that.zoomAtPoint(that.svg, SvgUtils.getSvgCenterPoint(that.svg), scale, false)
838 var svg = Utils.getSvg(elementOrSelector)
840 if (svg === null) {
845 if (instancesStore[i].svg === svg) {
852 svg: svg
853 , instance: new SvgPanZoom(svg, options)
870 getSvgDimensions: function(svg) {
873 , svgClientRects = svg.getClientRects()
883 var svgComputedStyle = window.getComputedStyle(svg, null);
887 var parentStyle = window.getComputedStyle(svg.parentElement, null);
888 var parentDimensions = svg.parentElement.getBoundingClientRect();
899 var svgBoundingClientRect = svg.getBoundingClientRect();
921 , getOrCreateViewport: function(svg) {
922 var viewport = svg.querySelector('g.viewport')
929 var svgChildren = svg.childNodes || svg.children;
933 svg.appendChild(viewport);
939 , setupSvgAttributes: function(svg) {
941 svg.setAttribute('xmlns', 'http://www.w3.org/1999/xlink');
942 svg.setAttributeNS('xmlns', 'xlink', 'http://www.w3.org/1999/xlink');
943 svg.setAttributeNS('xmlns', 'ev', 'http://www.w3.org/2001/xml-events');
946 if (svg.parentNode !== null) {
947 var style = svg.getAttribute('style') || '';
949 svg.setAttribute('style', 'overflow: hidden; ' + style);
975 return function(svg) {
977 if (svgs.hasOwnProperty(svg)) {
978 var cached = svgs[svg];
982 cached.ctm = svg.getScreenCTM();
986 var ctm = svg.getScreenCTM();
987 svgs[svg] = {time: cur, ctm: ctm};
1000 , getRelativeMousePoint: function(svg, evt) {
1001 var point = svg.createSVGPoint()
1006 return point.matrixTransform(this.getScreenCTMCached(svg).inverse())
1015 …var svg = (evt.target.tagName === 'svg' || evt.target.tagName === 'SVG') ? evt.target : evt.target…
1016 , point = svg.createSVGPoint()
1030 , getSvgCenterPoint: function(svg) {
1031 var boundingClientRect = svg.getBoundingClientRect()
1034 , point = svg.createSVGPoint()
1106 , svg;
1128 svg = element;
1131 svg = element.contentDocument.documentElement;
1134 svg = element.getSVGDocument().documentElement;
1146 return svg