[FEAT] Added vue router and pages

This commit is contained in:
2025-11-26 15:59:34 +01:00
parent 107caef54d
commit 7152482687
11 changed files with 679 additions and 505 deletions

View File

@@ -11,10 +11,11 @@ export const createEmptyLayer = (name: string): Layer => ({
locked: false,
});
const layers = ref<Layer[]>([createEmptyLayer('Base')]);
const activeLayerId = ref<string>(layers.value[0].id);
const columns = ref(4);
export const useLayers = () => {
const layers = ref<Layer[]>([createEmptyLayer('Base')]);
const activeLayerId = ref<string>(layers.value[0].id);
const columns = ref(4);
const settingsStore = useSettingsStore();
watch(columns, val => {
@@ -27,6 +28,8 @@ export const useLayers = () => {
const getMaxDimensions = (sprites: Sprite[]) => getMaxDimensionsSingle(sprites);
const visibleLayers = computed(() => layers.value.filter(l => l.visible));
const updateSpritePosition = (id: string, x: number, y: number) => {
const l = activeLayer.value;
if (!l) return;
@@ -217,8 +220,6 @@ export const useLayers = () => {
}
};
const visibleLayers = computed(() => layers.value.filter(l => l.visible));
return {
layers,
visibleLayers,