Comments (5)
Can you check which version are you using now? the latest version is 0.11
from snap.svg.zpd.
bower install snap.svg.zpd --save
returns
bower snap.svg.zpd#* cached https://github.com/huei90/snap.svg.zpd.git#0.0.11
bower snap.svg.zpd#* validate 0.0.11 against https://github.com/huei90/snap.svg.zpd.git#*
bower snap.svg.zpd#^0.0.11 install snap.svg.zpd#0.0.11
bower no-json No bower.json file to save to, use bower init to create one
containing this method:
/**
* Instance an SVGPoint object with given event coordinates.
*/
var _findPos = function findPos(obj) {
var curleft = curtop = 0;
if (obj.offsetParent) {
do {
curleft += obj.offsetLeft;
curtop += obj.offsetTop;
} while(obj = obj.offsetParent);
}
return [curleft,curtop];
};
So yes, it is 0.11
but what I need would be the version that uses this method.
/**
* Instance an SVGPoint object with given event coordinates.
*/
var _findPos = function findPos(obj) {
var curleft = curtop = 0;
var boundingClientRect = obj.getBoundingClientRect();
if (boundingClientRect) {
curleft = boundingClientRect.left;
curtop = boundingClientRect.top;
}
return [curleft, curtop];
return [curleft, curtop];
};
So it seems to be that bower is serving a version that has different code than the file available on github. For my purposes 0.11
does not work. Commit 3891737 on github does work. That is which i used, not where the method was changed.
Thanks for the quick reply.
from snap.svg.zpd.
Hello @toolchild
yes, what you can do for now, is pulling the latest commit of the repo.
The latest code is not on the version tag now.
from snap.svg.zpd.
Hi again,
Just for completeness sake:
Adding the following dependency to the bower.json
gives me the correct version.
"dependencies": {
"snap.svg.zpd": "https://github.com/huei90/snap.svg.zpd.git#fee6d6025e736945a3cd2828b2d02b9287856b12"
},
from snap.svg.zpd.
Yes this is what you can do for now.
I will update you once there is a bump version 😄
from snap.svg.zpd.
Related Issues (20)
- Zoom and Pan at the same time? HOT 1
- Chrome 48 removes SVGGraphicsElement.getTransformToElement() HOT 6
- 'SVGElement.offsetParent' is deprecated HOT 5
- Zoom to element help HOT 1
- Zoom behaviors in demo 1 and 2 aren't working HOT 2
- zoom on SVG document with offset position HOT 1
- [LIMITED the POWER] This usually use on present view only. NOT for the purpose of Storing or Modifying the paper.
- _getEventPoint() using clientX/clientY HOT 5
- load: not working HOT 6
- new feature: limit pan directions HOT 4
- wheel events no longer working in chrome/opera/firefox in the presence of both a touch pad and a mouse HOT 5
- onClick not working in Ionic IOS HOT 4
- Implemented a new feature: pan/drag in boundaries
- zpd prevent others elements to fire onblur events HOT 1
- plugin on npm is not up to date
- how to use this plugin with typescript and snapsvg-cjs HOT 2
- zoomThreshold not working
- e2e test spec
- paper.zpd('origin') only resets zoom level, not position
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from snap.svg.zpd.