mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
feat(web-view): disableZoom property (#9391)
This commit is contained in:
@@ -3,11 +3,14 @@ import { ContainerView, CSSType } from '../core/view';
|
||||
import { Property } from '../core/properties';
|
||||
import { EventData } from '../../data/observable';
|
||||
import { knownFolders } from '../../file-system';
|
||||
import { booleanConverter } from '../core/view-base';
|
||||
|
||||
export * from './web-view-interfaces';
|
||||
|
||||
export const srcProperty = new Property<WebViewBase, string>({ name: 'src' });
|
||||
|
||||
export const disableZoomProperty = new Property<WebViewBase, boolean>({ name: 'disableZoom', defaultValue: false, valueConverter: booleanConverter });
|
||||
|
||||
@CSSType('WebView')
|
||||
export abstract class WebViewBase extends ContainerView {
|
||||
public static loadStartedEvent = 'loadStarted';
|
||||
@@ -15,6 +18,8 @@ export abstract class WebViewBase extends ContainerView {
|
||||
|
||||
public src: string;
|
||||
|
||||
public disableZoom: boolean;
|
||||
|
||||
public _onLoadFinished(url: string, error?: string) {
|
||||
const args = <LoadEventData>{
|
||||
eventName: WebViewBase.loadFinishedEvent,
|
||||
@@ -102,3 +107,4 @@ export interface WebViewBase {
|
||||
}
|
||||
|
||||
srcProperty.register(WebViewBase);
|
||||
disableZoomProperty.register(WebViewBase);
|
||||
|
||||
Reference in New Issue
Block a user