AI-native design editor. Open-source Figma alternative.
Fix rotation icon to rotate-ccw, add rotate 90° button
Danila Poyarkovb0a35a4d2472
diff --git a/components.d.ts b/components.d.tsindex 8efa84570..321ba6220 100644--- a/components.d.ts+++ b/components.d.ts@@ -35,6 +35,7 @@ declare module 'vue' {IconLucideFlipHorizontal: typeof import('~icons/lucide/flip-horizontal')['default']IconLucideFlipVertical: typeof import('~icons/lucide/flip-vertical')['default']IconLucideRadius: typeof import('~icons/lucide/radius')['default']+ IconLucideRotateCcw: typeof import('~icons/lucide/rotate-ccw')['default']IconLucideRotateCw: typeof import('~icons/lucide/rotate-cw')['default']IconLucideSearch: typeof import('~icons/lucide/search')['default']LayersPanel: typeof import('./src/components/LayersPanel.vue')['default']diff --git a/src/components/properties/PositionSection.vue b/src/components/properties/PositionSection.vueindex acf2ca1c8..c72409f90 100644--- a/src/components/properties/PositionSection.vue+++ b/src/components/properties/PositionSection.vue@@ -66,6 +66,12 @@ function flipVertical() {store.updateNodeWithUndo(n.id, { rotation: (180 - n.rotation) % 360 }, 'Flip vertical')store.requestRender()}++function rotate90() {+ const n = node.value+ store.updateNodeWithUndo(n.id, { rotation: (n.rotation + 90) % 360 }, 'Rotate 90°')+ store.requestRender()+}</script><template>@@ -132,7 +138,7 @@ function flipVertical() {<div class="mt-1.5 flex items-center gap-1.5"><ScrubInput class="flex-1" suffix="°" :model-value="Math.round(node.rotation)" :min="-360" :max="360" @update:model-value="updateProp('rotation', $event)" @commit="(v: number, p: number) => commitProp('rotation', v, p)"><template #icon>- <icon-lucide-rotate-cw class="size-3" />+ <icon-lucide-rotate-ccw class="size-3" /></template></ScrubInput><button@@ -149,6 +155,13 @@ function flipVertical() {><icon-lucide-flip-vertical class="size-3.5" /></button>+ <button+ class="flex size-7 shrink-0 cursor-pointer items-center justify-center rounded border border-border bg-input text-muted hover:bg-hover hover:text-surface"+ title="Rotate 90°"+ @click="rotate90"+ >+ <icon-lucide-rotate-cw class="size-3.5" />+ </button></div></div></template>