Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clone() objects are not retaining properties #88

ghost opened this issue Sep 16, 2013 · 1 comment

clone() objects are not retaining properties #88

ghost opened this issue Sep 16, 2013 · 1 comment


Copy link

ghost commented Sep 16, 2013

I noticed this in my own code but you can actually see the effects of this problem in the docs example here:

There is only one black rectangle when there should be two. If the example code is edited so that:

var rectangle_2 = rectangle_1.clone({
    x: 77,
    y: 190,
    width: 200,
    height: 100

The rectangle will now appear.

koggdal added a commit that referenced this issue Sep 16, 2013
The last version broke the clone method in some cases, when the
properties were not directly on the object but further up the
prototype chain. oCanvas now polyfills the planned ES6 method
Object.getPropertyDescriptor to make it look through the
prototype chain as well.
@koggdal koggdal closed this as completed Sep 16, 2013
Copy link

koggdal commented Sep 16, 2013


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

No branches or pull requests

1 participant