Skip to content
This repository was archived by the owner on Jan 24, 2023. It is now read-only.

fix: core usage of zeroLength #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
"@commitlint/config-conventional": "^17.3.0",
"@nativescript-community/text": "^1.5.9",
"@nativescript-community/ui-canvas": "^4.4.5",
"@nativescript/core": "8.4.1",
"@nativescript/types-android": "8.4.0",
"@nativescript/types-ios": "8.4.0",
"@nativescript/core": "~8.4.7",
"@nativescript/types-android": "~8.4.0",
"@nativescript/types-ios": "~8.4.0",
"@nativescript/webpack": "5.0.12",
"@types/node": "^18.11.10",
"@typescript-eslint/eslint-plugin": "5.45.0",
Expand Down
6 changes: 3 additions & 3 deletions src/index.common.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { init } from '@nativescript-community/text';
import { Canvas, CanvasView, PorterDuffMode } from '@nativescript-community/ui-canvas';
import Shape, { lengthProperty, percentLengthProperty } from '@nativescript-community/ui-canvas/shapes/shape';
import { CSSType, CoreTypes, ImageAsset, Property, View, zeroLength } from '@nativescript/core';
import { CSSType, CoreTypes, ImageAsset, Property, View } from '@nativescript/core';

// init text to ensure font overrides are called
init();
Expand Down Expand Up @@ -43,8 +43,8 @@ export abstract class SVG extends Shape {
_parent: WeakRef<any>;
@percentLengthProperty width: CoreTypes.PercentLengthType;
@percentLengthProperty height: CoreTypes.PercentLengthType;
@lengthProperty left: CoreTypes.LengthType = zeroLength;
@lengthProperty top: CoreTypes.LengthType = zeroLength;
@lengthProperty left: CoreTypes.LengthType = CoreTypes.zeroLength;
@lengthProperty top: CoreTypes.LengthType = CoreTypes.zeroLength;
blendingMode: PorterDuffMode;
cache: boolean = true;
drawOnCanvas(canvas: Canvas, parent: CanvasView) {}
Expand Down