|
5 | 5 |
|
6 | 6 | import Observable from '@nativescript-community/observable'; |
7 | 7 | import { EventData } from '@nativescript/core'; |
8 | | -import { Property, View, booleanConverter } from '@nativescript/core/ui'; |
| 8 | +import { CssProperty, Property, Style, View, booleanConverter } from '@nativescript/core/ui'; |
9 | 9 | import { |
10 | 10 | FlingGestureHandler, |
11 | 11 | FlingGestureHandlerOptions, |
@@ -255,11 +255,6 @@ export const ViewInitEvent = 'ViewInitEvent'; |
255 | 255 | export const ViewDisposeEvent = 'ViewDisposeEvent'; |
256 | 256 |
|
257 | 257 | let NATIVE_GESTURE_TAG = 74000; |
258 | | -export const exclusiveTouchProperty = new Property<View, boolean>({ |
259 | | - name: 'exclusiveTouch', |
260 | | - defaultValue: false, |
261 | | - valueConverter: booleanConverter, |
262 | | -}); |
263 | 258 | class ViewGestureExtended extends View { |
264 | 259 | exclusiveTouchGestureHandler: NativeViewGestureHandler; |
265 | 260 | initNativeView() { |
@@ -292,14 +287,21 @@ class ViewGestureExtended extends View { |
292 | 287 | } |
293 | 288 | } |
294 | 289 |
|
| 290 | +export const exclusiveTouchProperty = new CssProperty<Style, boolean>({ |
| 291 | + name: 'exclusiveTouch', |
| 292 | + cssName: 'exclusive-touch', |
| 293 | + defaultValue: false, |
| 294 | + valueConverter: booleanConverter, |
| 295 | +}); |
| 296 | +exclusiveTouchProperty.register(Style); |
| 297 | + |
295 | 298 | let installed = false; |
296 | 299 | export function overrideViewBase() { |
297 | 300 | const NSView = require('@nativescript/core/ui/core/view').View; |
298 | | - exclusiveTouchProperty.register(NSView); |
299 | 301 | applyMixins(NSView, [ViewGestureExtended]); |
300 | 302 | } |
301 | 303 |
|
302 | | -export function install() { |
| 304 | +export function install(overrideNGestures?: boolean) { |
303 | 305 | if (installed) { |
304 | 306 | return; |
305 | 307 | } |
|
0 commit comments