Skip to content

Conversation

@HriBB
Copy link
Contributor

@HriBB HriBB commented Aug 1, 2022

Description

I believe I have found a bug in paper.js. I am using javascript directly, so no PaperScript. My use case is the following:

// insertItems is turned off globally because I am using react-reconciler to handle rendering
paper.settings.insertItems = false;

// one of my tools has a use case, where I need to bypass react's rendering mechanism
var circle = new paper.Path.Circle({ insert: true });

// but circle is not inserted into the project and thus not visible until I render it with react
console.log(circle.isInserted()) // false

Path.Circle calls createEllipse, which calls createPath, which does not pass arguments to Path constructor.

Checklist

  • New tests added or existing tests modified to cover all changes
  • Code conforms with the JSHint rules (yarn run jshint passes)

path = new Path(props && (props.insert == true
? { insert: true }
: props.insert == false && Item.NO_INSERT
));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can simply pass on props, but will merge first and check after.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants