canvas - FabricJS - Setting object position with pivot being top-left corner -


i started using quite awesome fabricjs framework, , noticed object positioning works bit different css conventions. css places positioning pivot on top-left corner, fabricjs has placed @ center of object:

css

@------------ |           | |           | |           | |           | |           | ------------- 

fabricjs

------------- |           | |           | |     @     | |           | |           | ------------- 

is there way control setting? thanks.


edit:

this exiting item on roadmap project. it'll happen in future, not supported.

you can specify "origin" of positioning of object when create it.

originx defaults "center", can change "left" or "right"

originy defaults "center" can change "bottom" or "top"

it's specified in docs. , here test.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -