Describe the bug
setPrefixedStyle in styleUtils.ts uses style.setProperty(name, value), but that function requires kebab-case/hyphen case property names (e.g. transform-origin). The only camelCase call site is setPrefixedStyle(this.textarea.style, 'transformOrigin', '0px 0px') in CellEditorHandler.ts, which is a silent no-op. This was introduced in commit 61648e4, which changed setPrefixedStyle from style[name] = value (accepts camelCase) to style.setProperty(name, value) (requires kebab-case).
To Reproduce
Steps to reproduce the behavior:
- Create a graph with at least one vertex
- Zoom to a non-1x level
- Double-click a cell to start editing
- The editor overlay is visibly offset from the cell label
Expected behavior
transform-origin: 0px 0px should be applied to the cell editor textarea. The editor overlay should align with the cell label at all zoom levels. This likely worked correctly in mxGraph.
Screenshots
N/A
Environment
maxGraph version or commit: present on current main
- Desktop or mobile: Desktop
- OS and version: Linux
- Browser and version: Latest Chromium
Additional context
Simplest fix is probably to change the call site to kebab-case/hyphen case: setPrefixedStyle(this.textarea.style, 'transform-origin', '0px 0px');.
Describe the bug
setPrefixedStylein styleUtils.ts usesstyle.setProperty(name, value), but that function requires kebab-case/hyphen case property names (e.g.transform-origin). The only camelCase call site issetPrefixedStyle(this.textarea.style, 'transformOrigin', '0px 0px')in CellEditorHandler.ts, which is a silent no-op. This was introduced in commit 61648e4, which changedsetPrefixedStylefromstyle[name] = value(accepts camelCase) tostyle.setProperty(name, value)(requires kebab-case).To Reproduce
Steps to reproduce the behavior:
Expected behavior
transform-origin: 0px 0pxshould be applied to the cell editor textarea. The editor overlay should align with the cell label at all zoom levels. This likely worked correctly inmxGraph.Screenshots
N/A
Environment
maxGraphversion or commit: present on current mainAdditional context
Simplest fix is probably to change the call site to kebab-case/hyphen case:
setPrefixedStyle(this.textarea.style, 'transform-origin', '0px 0px');.