From 17750384aacab734e9973a8f4f4609ca23c9b854 Mon Sep 17 00:00:00 2001 From: warxander Date: Fri, 17 Nov 2023 14:57:33 +0300 Subject: [PATCH] refactor: Use `Vector2` for `Style` members --- src/core/style.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/style.ts b/src/core/style.ts index d2c16d5..e010998 100644 --- a/src/core/style.ts +++ b/src/core/style.ts @@ -1,4 +1,4 @@ -import { Color, Image, FontSize } from './types'; +import { Color, Image, FontSize, Vector2 } from './types'; import { parse, CssRuleAST, CssTypes, CssDeclarationAST } from '@adobe/css-tools'; type StylePropertyValuesMap = Map; @@ -123,7 +123,7 @@ export class Style { this.slider = { height: 0.004, - tickMarkSize: { x: 0.002, y: 0.016 } + tickMarkSize: new Vector2(0.002, 0.016) }; this.spriteButton = { @@ -142,8 +142,8 @@ export class Style { }; this.frame = { - margins: { x: 0.01, y: 0.018 }, - spacing: { x: 0.005, y: 0.01 } + margins: new Vector2(0.01, 0.018), + spacing: new Vector2(0.005, 0.01) }; }