Possible bug with listenTo and "change:position" #3017
-
IntroductionI've got some working code where some shapes need to respond to changes to their environment (browser size, and the location of other elements).
later on, when i do this:
the above listenTo event code is executed, as expected. BUT, if I modify the position using this:
then the listenTo event is NOT executed? I've patched my code to use the process that works for now, but thought I'd mention this. I'm using the current release (4.1.1) Steps to reproduceNo response Restrictions & ConstraintsNo response Does your question relate to JointJS or JointJS+. Select both if applicable.JointJS, JointJS+ |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hello, thank you for the question. When calling class Element<A extends ObjectHash = Element.Attributes, S extends mvc.ModelSetOptions = dia.ModelSetOptions> extends Cell<A, S> {
// ...
position(opt?: Element.PositionOptions): g.Point;
position(x: number, y: number, opt?: Element.PositionOptions): this;
// ...
} No position is updated so no |
Beta Was this translation helpful? Give feedback.
-
Ahh, thanks, I expecting type checking to pick up a bad param, but that won't work where the Options values are concerned... |
Beta Was this translation helpful? Give feedback.
Hello, thank you for the question. When calling
Element.position({})
with a single argument, it acts as a getter with the single argument being options:No position is updated so no
change:position
event gets fired.