mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
feat(HtmlView): selectable property (#10057)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { Color } from '../../color';
|
||||
import { Font } from '../styling/font';
|
||||
import { colorProperty, fontInternalProperty } from '../styling/style-properties';
|
||||
import { HtmlViewBase, htmlProperty, linkColorProperty } from './html-view-common';
|
||||
import { HtmlViewBase, htmlProperty, selectableProperty, linkColorProperty } from './html-view-common';
|
||||
import { View } from '../core/view';
|
||||
import { iOSNativeHelper, layout } from '../../utils';
|
||||
|
||||
@@ -59,10 +59,6 @@ export class HtmlView extends HtmlViewBase {
|
||||
}
|
||||
}
|
||||
|
||||
[htmlProperty.getDefault](): string {
|
||||
return '';
|
||||
}
|
||||
|
||||
private renderWithStyles() {
|
||||
let html = this.currentHtml;
|
||||
const styles = [];
|
||||
@@ -86,11 +82,21 @@ export class HtmlView extends HtmlViewBase {
|
||||
}
|
||||
}
|
||||
|
||||
[htmlProperty.getDefault](): string {
|
||||
return '';
|
||||
}
|
||||
[htmlProperty.setNative](value: string) {
|
||||
this.currentHtml = value;
|
||||
this.renderWithStyles();
|
||||
}
|
||||
|
||||
[selectableProperty.getDefault](): boolean {
|
||||
return true;
|
||||
}
|
||||
[selectableProperty.setNative](value: boolean) {
|
||||
this.nativeViewProtected.selectable = value;
|
||||
}
|
||||
|
||||
[colorProperty.getDefault](): UIColor {
|
||||
return this.nativeViewProtected.textColor;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user