Paperjs 0.9.25 - item.setRampPoint is not a function

I have been using paperjs for a year now, without any problems. After updating Chrome (Version 55.0.2883.87 m) some production code that I hadn’t touched for 2 months started crashing with error: item.setRampPoint is not a function :

paper-full.js:13213 Uncaught TypeError: item.setRampPoint is not a function

 at offset (paper-full.js:13213) at Object.<anonymous> (paper-full.js:13263) at Object.forIn (paper-full.js:46) at Function.each (paper-full.js:133) at applyAttributes (paper-full.js:13260) at importGroup (paper-full.js:12944) at importSVG (paper-full.js:13324) at Project.importSVG (paper-full.js:13356) at drawAddLaneButtons (tlc.js:267) at Path.window.drawTlcElements (tlc.js:62) 

If I comment on the setRamPoint call in setRamPoint code, it will start working again.

This happens when I try to upload SVG to a page, but, as I said, it worked fine for a long time.

I am using version 0.9.25 paperjs .

Any ideas?

+5
source share
2 answers

We had the same problem and it was updated to the new version of PaperJS. He worked

+5
source

If anyone wants to avoid updating paperjs.
A simple hack can be:

 if (!paper.Item.prototype.setRampPoint) { paper.Item.prototype.setRampPoint = function () {}; } 

Something seems to have not broken.

+2
source

Source: https://habr.com/ru/post/1261739/


All Articles