Git Product home page Git Product logo

Comments (5)

hueitan avatar hueitan commented on May 25, 2024

Can you check which version are you using now? the latest version is 0.11

from snap.svg.zpd.

toolchild avatar toolchild commented on May 25, 2024

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.

hueitan avatar hueitan commented on May 25, 2024

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.

toolchild avatar toolchild commented on May 25, 2024

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.

hueitan avatar hueitan commented on May 25, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.