-
Notifications
You must be signed in to change notification settings - Fork 757
GCP2 Zones – Shared style variable causes ellipse rendering in “Project Zone / Cloud Service Provider” #5509
Description
Preflight Checklist
- I agree to follow the Code of Conduct that this project adheres to.
- I have searched the issue tracker for a feature request that matches the one I want to file, without success.
Describe the bug
Project Zone / Cloud Service Provider” stencil in the GCP2 / Zones palette is rendered as an ellipse instead of a rounded rectangle.
The shape is rendered as an ellipse, with style including: shape=ellipse; perimeter=ellipsePerimeter; ...
Analysis
In Sidebar.prototype.addGCP2ZonesPalette:
var s = 'sketch=0;...;whiteSpace=wrap;';Later in the same function:
this.addEntry(dt + 'markers', function()
{
s = 'shape=ellipse;perimeter=ellipsePerimeter;...';Because s is defined in the parent function scope and captured by closures, this reassignment mutates the shared style used by other entries (including “Project Zone / Cloud Service Provider”).
The bug may appear inconsistently depending on palette initialization order.
To Reproduce
Steps to reproduce the behavior:
- Open VSCode
- Install https://marketplace.visualstudio.com/items?itemName=hediet.vscode-drawio
- Create a file
test.drawio.png - Open the file with the extension
- Click "More Shape"
- Add the "Google Cloud Platform" Library
- Open the GCP / Zones
- Add the "Project Zone / Cloud Service Provider" stencil
Expected behavior
Shapes should be rectangle without shape=ellipse; perimeter=ellipsePerimeter; style
Screenshots
draw.io version (In the Help->About menu of the draw.io editor):
- draw.io version v26.0.2 (extension v1.9.250226013)
Desktop (please complete the following information):
- OS: Windows 11
- VSCode 1.112.0
I tested the problem in incognito/private mode with all browser extensions switched off, write "yes" below:
yes
Additional context
Does not happen with Browser version v29.6.5 w/ Chrome 146.0.7680.153

