diff --git a/packages/canvas-babylon/package.json b/packages/canvas-babylon/package.json index b752ac80..7e3e1ed5 100644 --- a/packages/canvas-babylon/package.json +++ b/packages/canvas-babylon/package.json @@ -1,6 +1,6 @@ { "name": "@nativescript/canvas-babylon", - "version": "2.0.0-beta.14", + "version": "2.0.0-beta.15", "description": "", "main": "index", "typings": "index.d.ts", diff --git a/packages/canvas-media/package.json b/packages/canvas-media/package.json index 88070c9d..7788c58e 100644 --- a/packages/canvas-media/package.json +++ b/packages/canvas-media/package.json @@ -1,6 +1,6 @@ { "name": "@nativescript/canvas-media", - "version": "2.0.0-beta.14", + "version": "2.0.0-beta.15", "description": "Canvas media", "main": "index", "typings": "index.d.ts", diff --git a/packages/canvas-phaser-ce/package.json b/packages/canvas-phaser-ce/package.json index 81e9fccc..e4f445ad 100644 --- a/packages/canvas-phaser-ce/package.json +++ b/packages/canvas-phaser-ce/package.json @@ -1,6 +1,6 @@ { "name": "@nativescript/canvas-phaser-ce", - "version": "2.0.0-beta.14", + "version": "2.0.0-beta.15", "description": "Tools for using Phaser-ce to build native 2D games in NativeScript 👾", "main": "index", "typings": "index.d.ts", diff --git a/packages/canvas-phaser/package.json b/packages/canvas-phaser/package.json index df7e4fec..9a6dda60 100644 --- a/packages/canvas-phaser/package.json +++ b/packages/canvas-phaser/package.json @@ -1,6 +1,6 @@ { "name": "@nativescript/canvas-phaser", - "version": "2.0.0-beta.14", + "version": "2.0.0-beta.15", "description": "Build awesome 2D games with Phaser.js and NativeScript", "main": "index", "typings": "index.d.ts", diff --git a/packages/canvas-pixi/package.json b/packages/canvas-pixi/package.json index dc04eb1a..32925130 100644 --- a/packages/canvas-pixi/package.json +++ b/packages/canvas-pixi/package.json @@ -1,6 +1,6 @@ { "name": "@nativescript/canvas-pixi", - "version": "2.0.0-beta.14", + "version": "2.0.0-beta.15", "description": "Plugin for using pixi.js in NativeScript", "main": "index", "typings": "index.d.ts", diff --git a/packages/canvas-polyfill/package.json b/packages/canvas-polyfill/package.json index b18392f1..af02838a 100644 --- a/packages/canvas-polyfill/package.json +++ b/packages/canvas-polyfill/package.json @@ -1,6 +1,6 @@ { "name": "@nativescript/canvas-polyfill", - "version": "2.0.0-beta.14", + "version": "2.0.0-beta.15", "description": "Polyfill for making NativeScript compatible with web libs like pixi.js, three.js, phaser.js, babylon.js, etc....", "main": "index", "typings": "index.d.ts", diff --git a/packages/canvas-three/package.json b/packages/canvas-three/package.json index 7f28a32a..1b2eeb2a 100644 --- a/packages/canvas-three/package.json +++ b/packages/canvas-three/package.json @@ -1,6 +1,6 @@ { "name": "@nativescript/canvas-three", - "version": "2.0.0-beta.14", + "version": "2.0.0-beta.15", "description": "Utilities for using THREE.js on NativeScript", "main": "index", "typings": "index.d.ts", diff --git a/packages/canvas/Canvas/common.ts b/packages/canvas/Canvas/common.ts index e4fb58a3..8202e41a 100644 --- a/packages/canvas/Canvas/common.ts +++ b/packages/canvas/Canvas/common.ts @@ -337,11 +337,6 @@ class Rectangle { } } -export const autoScaleProperty = new Property({ - name: 'autoScale', - defaultValue: true, - valueConverter: booleanConverter, -}); export const ignoreTouchEventsProperty = new Property({ name: 'ignoreTouchEvents', @@ -360,7 +355,6 @@ export const doc = { @CSSType('Canvas') export abstract class CanvasBase extends View implements ICanvasBase { public static readyEvent = 'ready'; - autoScale: boolean; ignoreTouchEvents: boolean; _isCustom: boolean = false; _classList: Set; @@ -1124,5 +1118,3 @@ export abstract class CanvasBase extends View implements ICanvasBase { releasePointerCapture(id) {} } - -autoScaleProperty.register(CanvasBase); diff --git a/packages/canvas/Canvas/index.android.ts b/packages/canvas/Canvas/index.android.ts index 66f5fd8c..6d2b92f1 100644 --- a/packages/canvas/Canvas/index.android.ts +++ b/packages/canvas/Canvas/index.android.ts @@ -1,4 +1,4 @@ -import { CanvasBase, doc, autoScaleProperty, ignoreTouchEventsProperty, DOMRect } from './common'; +import { CanvasBase, doc, ignoreTouchEventsProperty, DOMRect } from './common'; import { DOMMatrix } from '../Canvas2D'; import { CanvasRenderingContext2D } from '../Canvas2D/CanvasRenderingContext2D'; import { WebGLRenderingContext } from '../WebGL/WebGLRenderingContext'; @@ -72,12 +72,8 @@ export class Canvas extends CanvasBase { } } - [autoScaleProperty.setNative](value: boolean) { - this._canvas.setAutoScale(value); - } - [ignoreTouchEventsProperty.setNative](value: boolean) { - this._canvas.setIgnoreTouchEvents = value; + this._canvas.setIgnoreTouchEvents(value); } // @ts-ignore diff --git a/packages/canvas/Canvas/index.ios.ts b/packages/canvas/Canvas/index.ios.ts index 49d66eda..b46efde5 100644 --- a/packages/canvas/Canvas/index.ios.ts +++ b/packages/canvas/Canvas/index.ios.ts @@ -1,4 +1,4 @@ -import { CanvasBase, doc, ignoreTouchEventsProperty, DOMRect, autoScaleProperty } from './common'; +import { CanvasBase, doc, ignoreTouchEventsProperty, DOMRect } from './common'; import { DOMMatrix } from '../Canvas2D'; import { CanvasRenderingContext2D } from '../Canvas2D/CanvasRenderingContext2D'; import { WebGLRenderingContext } from '../WebGL/WebGLRenderingContext'; @@ -96,7 +96,11 @@ export class Canvas extends CanvasBase { }; } } - qqq; + + [ignoreTouchEventsProperty.setNative](value: boolean) { + this._canvas.ignoreTouchEvents = value; + } + // @ts-ignore get ios() { return this._canvas; diff --git a/packages/canvas/package.json b/packages/canvas/package.json index f66bf348..a2cb86d7 100644 --- a/packages/canvas/package.json +++ b/packages/canvas/package.json @@ -1,6 +1,6 @@ { "name": "@nativescript/canvas", - "version": "2.0.0-beta.14", + "version": "2.0.0-beta.15", "description": "DOM Canvas API for NativeScript", "main": "index", "typings": "index.d.ts", diff --git a/packages/canvas/src-native/canvas-android/.idea/misc.xml b/packages/canvas/src-native/canvas-android/.idea/misc.xml index 29f12ea0..7b4cac2e 100644 --- a/packages/canvas/src-native/canvas-android/.idea/misc.xml +++ b/packages/canvas/src-native/canvas-android/.idea/misc.xml @@ -1,4 +1,3 @@ - diff --git a/packages/canvas/src-native/canvas-ios/CanvasNative.xcodeproj/project.xcworkspace/xcuserdata/triniwiz.xcuserdatad/UserInterfaceState.xcuserstate b/packages/canvas/src-native/canvas-ios/CanvasNative.xcodeproj/project.xcworkspace/xcuserdata/triniwiz.xcuserdatad/UserInterfaceState.xcuserstate index 8590e639..87424741 100644 Binary files a/packages/canvas/src-native/canvas-ios/CanvasNative.xcodeproj/project.xcworkspace/xcuserdata/triniwiz.xcuserdatad/UserInterfaceState.xcuserstate and b/packages/canvas/src-native/canvas-ios/CanvasNative.xcodeproj/project.xcworkspace/xcuserdata/triniwiz.xcuserdatad/UserInterfaceState.xcuserstate differ