konvajs / konva

Konva.js is an HTML5 Canvas JavaScript framework that extends the 2d context by enabling canvas interactivity for desktop and mobile applications.
http://konvajs.org/
Other
11.59k stars 926 forks source link

Group and Node documentation #159

Closed ada99 closed 8 years ago

ada99 commented 8 years ago

Group and Node don't have getSelfRect method. It appears only in Shape. Group has nested method from Container - getClientRect, so getSelfRect could be realized in the same way in Container.

lavrton commented 8 years ago

@ada99 So what is your question or issue?

lavrton commented 8 years ago

@ada99 do you mean remove getSelfRect from documentation?

lavrton commented 8 years ago

It was typo in documentation. Fixed by https://github.com/konvajs/konva/commit/c7de29389faf9b706a1a733f07b7a2ae7656fed9

ada99 commented 8 years ago

How about something like this: https://github.com/ada99/konva/commit/b78a7db074c9df18d6b64e29de75bcbd34542e45 ?

lavrton commented 8 years ago

What is a use case of this function? Any difference from getClientRect()?

ada99 commented 8 years ago

It does not take in consideration shape styles (like shadow), and it should be faster a bit