Skip to content

Commit

Permalink
rebuild 9.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
anvaka committed Apr 8, 2021
1 parent 954c33a commit ce3c04b
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 25 deletions.
48 changes: 24 additions & 24 deletions dist/panzoom.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ function createPanZoom(domElement, options) {
var initialY = typeof options.initialY === 'number' ? options.initialY : transform.y;
var initialZoom = typeof options.initialZoom === 'number' ? options.initialZoom : transform.scale;

if(initialX != transform.x || initialY != transform.y || initialZoom != transform.Scale){
if(initialX != transform.x || initialY != transform.y || initialZoom != transform.scale){
zoomAbs(initialX, initialY, initialZoom);
}

Expand Down Expand Up @@ -442,7 +442,7 @@ function createPanZoom(domElement, options) {
}

function smoothMoveTo(x, y){
internalMoveBy(x - transform.x, y - transform.y, true)
internalMoveBy(x - transform.x, y - transform.y, true);
}

function internalMoveBy(dx, dy, smooth) {
Expand Down Expand Up @@ -1024,8 +1024,8 @@ function autoRun() {
function collectOptions(script) {
var attrs = script.attributes;
var options = {};
for (var i = 0; i < attrs.length; ++i) {
var attr = attrs[i];
for (var j = 0; j < attrs.length; ++j) {
var attr = attrs[j];
var nameValue = getPanzoomAttributeNameValue(attr);
if (nameValue) {
options[nameValue.name] = nameValue.value;
Expand Down Expand Up @@ -1102,14 +1102,14 @@ function disabled(e) {
function noop() {}

},{}],3:[function(require,module,exports){
module.exports = makeDomController
module.exports = makeDomController;

module.exports.canAttach = isDomElement;

function makeDomController(domElement, options) {
var elementValid = isDomElement(domElement);
if (!elementValid) {
throw new Error('panzoom requires DOM element to be attached to the DOM tree')
throw new Error('panzoom requires DOM element to be attached to the DOM tree');
}

var owner = domElement.parentElement;
Expand All @@ -1123,12 +1123,12 @@ function makeDomController(domElement, options) {
getBBox: getBBox,
getOwner: getOwner,
applyTransform: applyTransform,
}
};

return api
return api;

function getOwner() {
return owner
return owner;
}

function getBBox() {
Expand All @@ -1138,7 +1138,7 @@ function makeDomController(domElement, options) {
top: 0,
width: domElement.clientWidth,
height: domElement.clientHeight
}
};
}

function applyTransform(transform) {
Expand All @@ -1147,7 +1147,7 @@ function makeDomController(domElement, options) {
domElement.style.transform = 'matrix(' +
transform.scale + ', 0, 0, ' +
transform.scale + ', ' +
transform.x + ', ' + transform.y + ')'
transform.x + ', ' + transform.y + ')';
}
}

Expand Down Expand Up @@ -1290,23 +1290,23 @@ function getRequestAnimationFrame() {

return function (handler) {
return setTimeout(handler, 16);
}
};
}
},{}],5:[function(require,module,exports){
module.exports = makeSvgController
module.exports = makeSvgController;
module.exports.canAttach = isSVGElement;

function makeSvgController(svgElement, options) {
if (!isSVGElement(svgElement)) {
throw new Error('svg element is required for svg.panzoom to work')
throw new Error('svg element is required for svg.panzoom to work');
}

var owner = svgElement.ownerSVGElement
var owner = svgElement.ownerSVGElement;
if (!owner) {
throw new Error(
'Do not apply panzoom to the root <svg> element. ' +
'Use its child instead (e.g. <g></g>). ' +
'As of March 2016 only FireFox supported transform on the root element')
'As of March 2016 only FireFox supported transform on the root element');
}

if (!options.disableKeyboardInteraction) {
Expand All @@ -1319,22 +1319,22 @@ function makeSvgController(svgElement, options) {
getOwner: getOwner,
applyTransform: applyTransform,
initTransform: initTransform
}
};

return api
return api;

function getOwner() {
return owner
return owner;
}

function getBBox() {
var bbox = svgElement.getBBox()
var bbox = svgElement.getBBox();
return {
left: bbox.x,
top: bbox.y,
width: bbox.width,
height: bbox.height,
}
};
}

function getScreenCTM() {
Expand All @@ -1348,11 +1348,11 @@ function makeSvgController(svgElement, options) {
}

function initTransform(transform) {
var screenCTM = svgElement.getCTM()
var screenCTM = svgElement.getCTM();

// The above line returns null on Firefox
if (screenCTM === null) {
screenCTM = document.createElementNS("http://www.w3.org/2000/svg", "svg").createSVGMatrix()
screenCTM = document.createElementNS("http://www.w3.org/2000/svg", "svg").createSVGMatrix();
}

transform.x = screenCTM.e;
Expand All @@ -1365,7 +1365,7 @@ function makeSvgController(svgElement, options) {
svgElement.setAttribute('transform', 'matrix(' +
transform.scale + ' 0 0 ' +
transform.scale + ' ' +
transform.x + ' ' + transform.y + ')')
transform.x + ' ' + transform.y + ')');
}
}

Expand Down
Loading

0 comments on commit ce3c04b

Please sign in to comment.