diff --git a/package.json b/package.json index ec97954..c1899c4 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ruwio", "private": true, - "version": "1.2.11", + "version": "1.2.12", "type": "module", "scripts": { "dev": "vite", diff --git a/src/components/PropertiesPanel.vue b/src/components/PropertiesPanel.vue index b846618..081847e 100644 --- a/src/components/PropertiesPanel.vue +++ b/src/components/PropertiesPanel.vue @@ -6,6 +6,7 @@ import { PhDiamond, PhEye, PhEyeSlash, + PhEyedropper, PhFlower, PhMaskHappy, PhWaveSine, @@ -23,8 +24,23 @@ import ActionEditor from './ActionEditor.vue' import FontPicker from './FontPicker.vue' import { t } from '@/i18n' import { useTimeFormat } from '@/composables/useTimeFormat' +import { useEyeDropper } from '@/composables/useEyeDropper' const { formatTime, timeToInputValue, inputValueToSeconds, inputStep, unitLabel } = useTimeFormat() +const { supported: eyeDropperSupported, pick: pickColor } = useEyeDropper() + +async function pickFillColor() { + const c = await pickColor() + if (c) fillColor.value = c +} +async function pickStrokeColor() { + const c = await pickColor() + if (c) strokeColor.value = c +} +async function pickShadowColor() { + const c = await pickColor() + if (c) shadowColorValue.value = c +} const SECTION_STORAGE_KEY = 'animatr:propSections' @@ -645,6 +661,16 @@ function deleteSelection() { @input="fillColor = ($event.target as HTMLInputElement).value" /> {{ fillTransparent ? '—' : fillColor.toUpperCase() }} +