How to stop paths automatically being inserted?

28 views
Skip to first unread message

Kyron Du Casse

unread,
May 6, 2021, 12:36:28 PMMay 6
to Paper.js

Hello all

I have been using paper-jsdom and normally I avoid adding paths to the project by using

var x = new paper.path({insert:false});

Its very annoying to have to use this everytime, and when using bool operations etc I think paths get added anyways or something.

is there a global command to stop inserts from happening full stop?

Thanks

MUKUND THAKARE

unread,
May 25, 2021, 7:30:52 AMMay 25
to Paper.js
I personally believe there isn't any such a global command.
But what you can do to achieve such a behavior is to write utility for creating a path like below.

_createPath(argNeededToCreatePath) : paper.Path{
        return new paper.Path(args,{insert : false})
  }

And use this function every time to create the path.


asensi...@gmail.com

unread,
May 25, 2021, 1:28:59 PMMay 25
to Paper.js
Hello,

in fact, this setting do exist as a property of the PaperScope instance paper.settings.insertItems
Reply all
Reply to author
Forward
0 new messages