Skip to content

Commit 85f60f3

Browse files
Merge branch 'main' into beta
2 parents 6424329 + df2be49 commit 85f60f3

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"id": "advanced-canvas",
33
"name": "Advanced Canvas",
4-
"version": "2.5.1",
4+
"version": "2.5.2",
55
"minAppVersion": "1.1.0",
66
"description": "Supercharge your canvas experience! Create presentations, flowcharts and more!",
77
"author": "Developer-Mike",

src/canvas-extensions/color-palette-canvas-extension.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,11 @@ export default class ColorPaletteCanvasExtension {
6060

6161
this.updateCustomColorModStyleClasses()
6262

63+
const currentNodeColor = canvas.getSelectionData().nodes.map(node => node.color).last()
6364
for (const colorId of this.getCustomColors()) {
6465
const customColorMenuItem = this.createColorMenuItem(canvas, colorId)
66+
if (currentNodeColor === colorId) customColorMenuItem.classList.add('is-active')
67+
6568
submenu.insertBefore(customColorMenuItem, submenu.lastChild)
6669
}
6770
})
@@ -75,6 +78,8 @@ export default class ColorPaletteCanvasExtension {
7578
menuItem.classList.add(`mod-canvas-color-${colorId}`)
7679

7780
menuItem.addEventListener('click', () => {
81+
menuItem.classList.add('is-active')
82+
7883
for (const item of canvas.selection) {
7984
item.setColor(colorId)
8085
}

0 commit comments

Comments
 (0)