You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I am trying to create a custom StyleManager property with 'integer' type.
My ultimate goal is to 're-define' how certain units are displayed. For example, the user use unit 'X' and then the actual value would be different in pixels.(One of the reasons is the new dragmode since it is using pixels, so I want to keep all values in pixels but would allow the user to use other units).
I've checked the available functions and by extending the 'integer' number input I should be able to achieve that. But I get an error when I try to extend the 'integer' type.
This gives an error: "Cannot set property 'ppfx' of undefined"
If I don't extend the view property it falls back to the default type without any issues. If I extend the 'stack' input type there are no issues at all.
What is required for a custom integer property like that?(GrapesJs version:0.15.8)
Thanks for your help.
The text was updated successfully, but these errors were encountered:
Actually, the integer property has a wrong implementation of init (I'll fix it in the next release).
For now, update your init method with the code below and try if it works
Hi,
I am trying to create a custom StyleManager property with 'integer' type.
My ultimate goal is to 're-define' how certain units are displayed. For example, the user use unit 'X' and then the actual value would be different in pixels.(One of the reasons is the new dragmode since it is using pixels, so I want to keep all values in pixels but would allow the user to use other units).
I've checked the available functions and by extending the 'integer' number input I should be able to achieve that. But I get an error when I try to extend the 'integer' type.
The code I tried:
This gives an error: "Cannot set property 'ppfx' of undefined"
If I don't extend the view property it falls back to the default type without any issues. If I extend the 'stack' input type there are no issues at all.
What is required for a custom integer property like that?(GrapesJs version:0.15.8)
Thanks for your help.
The text was updated successfully, but these errors were encountered: