diff --git a/src/jcanvas.d.ts b/src/jcanvas.d.ts index 2c947ce..ed9b7f1 100644 --- a/src/jcanvas.d.ts +++ b/src/jcanvas.d.ts @@ -133,6 +133,11 @@ interface JCanvasBaseTransforms { masks: JCanvasObject[]; } +interface JCanvasCss { + props: (keyof JCanvasObject)[]; + propsObj: Record; +} + interface JCanvasPx { r: number; g: number; diff --git a/src/jcanvas.ts b/src/jcanvas.ts index 9e643e9..5e4054e 100644 --- a/src/jcanvas.ts +++ b/src/jcanvas.ts @@ -6,7 +6,7 @@ import $ from "jquery"; import "./jcanvas.d"; -// Define local aliases to frequently used properties +// Define local aliases t o frequently used properties const extendObject = Object.assign, inArray = $.inArray, typeOf = function (operand: any) { @@ -74,12 +74,10 @@ const extendObject = Object.assign, // Store all previous masks masks: [], }, - css = { + css: JCanvasCss = { // Define properties used in both CSS and jCanvas props: ["width", "height", "opacity", "lineHeight"], - // List of CSS3 cursors that need to be prefixed - cursors: ["grab", "grabbing", "zoom-in", "zoom-out"], - propsObj: {} as Record, + propsObj: {}, }, tangibleEvents: ( | JCanvasMouseEventName