jpf-mobx 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +21 -0
- package/README.md +21 -0
- package/dist/controls/codeMirror/HtmlEditor/HtmlEditor.d.ts +0 -0
- package/dist/controls/codeMirror/HtmlEditor/HtmlEditor.js +1 -0
- package/dist/controls/codeMirror/HtmlEditor/HtmlEditor.js.map +1 -0
- package/dist/controls/codeMirror/JsonEditor/JsonEditor.d.ts +0 -0
- package/dist/controls/codeMirror/JsonEditor/JsonEditor.js +1 -0
- package/dist/controls/codeMirror/JsonEditor/JsonEditor.js.map +1 -0
- package/dist/controls/codeMirror/index.d.ts +0 -0
- package/dist/controls/codeMirror/index.js +1 -0
- package/dist/controls/codeMirror/index.js.map +1 -0
- package/dist/controls/custom/FileSelector/FileSelector.d.ts +0 -0
- package/dist/controls/custom/FileSelector/FileSelector.js +1 -0
- package/dist/controls/custom/FileSelector/FileSelector.js.map +1 -0
- package/dist/controls/custom/LabeledControl/LabeledControl.d.ts +15 -0
- package/dist/controls/custom/LabeledControl/LabeledControl.js +37 -0
- package/dist/controls/custom/LabeledControl/LabeledControl.js.map +1 -0
- package/dist/controls/custom/ListItem/ListItem.d.ts +0 -0
- package/dist/controls/custom/ListItem/ListItem.js +1 -0
- package/dist/controls/custom/ListItem/ListItem.js.map +1 -0
- package/dist/controls/custom/index.d.ts +1 -0
- package/dist/controls/custom/index.js +2 -0
- package/dist/controls/custom/index.js.map +1 -0
- package/dist/controls/html/Button/Button.d.ts +0 -0
- package/dist/controls/html/Button/Button.js +1 -0
- package/dist/controls/html/Button/Button.js.map +1 -0
- package/dist/controls/html/Div/Div.d.ts +14 -0
- package/dist/controls/html/Div/Div.js +25 -0
- package/dist/controls/html/Div/Div.js.map +1 -0
- package/dist/controls/html/Image/Image.d.ts +16 -0
- package/dist/controls/html/Image/Image.js +29 -0
- package/dist/controls/html/Image/Image.js.map +1 -0
- package/dist/controls/html/Input/Input.d.ts +0 -0
- package/dist/controls/html/Input/Input.js +1 -0
- package/dist/controls/html/Input/Input.js.map +1 -0
- package/dist/controls/html/Select/Select.d.ts +0 -0
- package/dist/controls/html/Select/Select.js +1 -0
- package/dist/controls/html/Select/Select.js.map +1 -0
- package/dist/controls/html/Span/Span.d.ts +11 -0
- package/dist/controls/html/Span/Span.js +23 -0
- package/dist/controls/html/Span/Span.js.map +1 -0
- package/dist/controls/html/index.d.ts +3 -0
- package/dist/controls/html/index.js +4 -0
- package/dist/controls/html/index.js.map +1 -0
- package/dist/controls/index.d.ts +6 -0
- package/dist/controls/index.js +7 -0
- package/dist/controls/index.js.map +1 -0
- package/dist/controls/jsonViewAwesome/index.d.ts +0 -0
- package/dist/controls/jsonViewAwesome/index.js +1 -0
- package/dist/controls/jsonViewAwesome/index.js.map +1 -0
- package/dist/controls/jsonViewAwesome/jsonFormatter/JsonFormatter.d.ts +0 -0
- package/dist/controls/jsonViewAwesome/jsonFormatter/JsonFormatter.js +1 -0
- package/dist/controls/jsonViewAwesome/jsonFormatter/JsonFormatter.js.map +1 -0
- package/dist/controls/kendo/Chart/Chart.d.ts +0 -0
- package/dist/controls/kendo/Chart/Chart.js +1 -0
- package/dist/controls/kendo/Chart/Chart.js.map +1 -0
- package/dist/controls/kendo/Culture/Culture.d.ts +1 -0
- package/dist/controls/kendo/Culture/Culture.js +26 -0
- package/dist/controls/kendo/Culture/Culture.js.map +1 -0
- package/dist/controls/kendo/DataSource/DataSource.d.ts +4 -0
- package/dist/controls/kendo/DataSource/DataSource.js +2 -0
- package/dist/controls/kendo/DataSource/DataSource.js.map +1 -0
- package/dist/controls/kendo/Dialog/Dialog.d.ts +0 -0
- package/dist/controls/kendo/Dialog/Dialog.js +1 -0
- package/dist/controls/kendo/Dialog/Dialog.js.map +1 -0
- package/dist/controls/kendo/Editor/Editor.d.ts +0 -0
- package/dist/controls/kendo/Editor/Editor.js +1 -0
- package/dist/controls/kendo/Editor/Editor.js.map +1 -0
- package/dist/controls/kendo/Grid/Grid.d.ts +0 -0
- package/dist/controls/kendo/Grid/Grid.js +1 -0
- package/dist/controls/kendo/Grid/Grid.js.map +1 -0
- package/dist/controls/kendo/Menu/Menu.d.ts +0 -0
- package/dist/controls/kendo/Menu/Menu.js +1 -0
- package/dist/controls/kendo/Menu/Menu.js.map +1 -0
- package/dist/controls/kendo/ObservableObject/ObservableObject.d.ts +0 -0
- package/dist/controls/kendo/ObservableObject/ObservableObject.js +1 -0
- package/dist/controls/kendo/ObservableObject/ObservableObject.js.map +1 -0
- package/dist/controls/kendo/Tree/Tree.d.ts +0 -0
- package/dist/controls/kendo/Tree/Tree.js +1 -0
- package/dist/controls/kendo/Tree/Tree.js.map +1 -0
- package/dist/controls/kendo/index.d.ts +0 -0
- package/dist/controls/kendo/index.js +1 -0
- package/dist/controls/kendo/index.js.map +1 -0
- package/dist/controls/leaflet/LabelControl/LabelControl.d.ts +12 -0
- package/dist/controls/leaflet/LabelControl/LabelControl.js +34 -0
- package/dist/controls/leaflet/LabelControl/LabelControl.js.map +1 -0
- package/dist/controls/leaflet/Map/Map.d.ts +0 -0
- package/dist/controls/leaflet/Map/Map.js +1 -0
- package/dist/controls/leaflet/Map/Map.js.map +1 -0
- package/dist/controls/leaflet/OpenStreetMapTileLayer/OpenStreetMapTileLayer.d.ts +8 -0
- package/dist/controls/leaflet/OpenStreetMapTileLayer/OpenStreetMapTileLayer.js +14 -0
- package/dist/controls/leaflet/OpenStreetMapTileLayer/OpenStreetMapTileLayer.js.map +1 -0
- package/dist/controls/leaflet/PointerEvent/PointerEvent.d.ts +2 -0
- package/dist/controls/leaflet/PointerEvent/PointerEvent.js +8 -0
- package/dist/controls/leaflet/PointerEvent/PointerEvent.js.map +1 -0
- package/dist/controls/leaflet/index.d.ts +3 -0
- package/dist/controls/leaflet/index.js +4 -0
- package/dist/controls/leaflet/index.js.map +1 -0
- package/dist/controls/svg/Circle/Circle.d.ts +0 -0
- package/dist/controls/svg/Circle/Circle.js +1 -0
- package/dist/controls/svg/Circle/Circle.js.map +1 -0
- package/dist/controls/svg/Ellipse/Ellipse.d.ts +0 -0
- package/dist/controls/svg/Ellipse/Ellipse.js +1 -0
- package/dist/controls/svg/Ellipse/Ellipse.js.map +1 -0
- package/dist/controls/svg/ForeignObject/ForeignObject.d.ts +0 -0
- package/dist/controls/svg/ForeignObject/ForeignObject.js +1 -0
- package/dist/controls/svg/ForeignObject/ForeignObject.js.map +1 -0
- package/dist/controls/svg/Group/Group.d.ts +0 -0
- package/dist/controls/svg/Group/Group.js +1 -0
- package/dist/controls/svg/Group/Group.js.map +1 -0
- package/dist/controls/svg/Line/Line.d.ts +0 -0
- package/dist/controls/svg/Line/Line.js +1 -0
- package/dist/controls/svg/Line/Line.js.map +1 -0
- package/dist/controls/svg/Pattern/Pattern.d.ts +0 -0
- package/dist/controls/svg/Pattern/Pattern.js +1 -0
- package/dist/controls/svg/Pattern/Pattern.js.map +1 -0
- package/dist/controls/svg/Polygon/Polygon.d.ts +0 -0
- package/dist/controls/svg/Polygon/Polygon.js +1 -0
- package/dist/controls/svg/Polygon/Polygon.js.map +1 -0
- package/dist/controls/svg/Polyline/Polyline.d.ts +0 -0
- package/dist/controls/svg/Polyline/Polyline.js +1 -0
- package/dist/controls/svg/Polyline/Polyline.js.map +1 -0
- package/dist/controls/svg/Rectangle/Rectangle.d.ts +0 -0
- package/dist/controls/svg/Rectangle/Rectangle.js +1 -0
- package/dist/controls/svg/Rectangle/Rectangle.js.map +1 -0
- package/dist/controls/svg/Svg/Svg.d.ts +0 -0
- package/dist/controls/svg/Svg/Svg.js +1 -0
- package/dist/controls/svg/Svg/Svg.js.map +1 -0
- package/dist/controls/svg/Text/Text.d.ts +0 -0
- package/dist/controls/svg/Text/Text.js +1 -0
- package/dist/controls/svg/Text/Text.js.map +1 -0
- package/dist/controls/svg/Title/Title.d.ts +0 -0
- package/dist/controls/svg/Title/Title.js +1 -0
- package/dist/controls/svg/Title/Title.js.map +1 -0
- package/dist/controls/svg/index.d.ts +0 -0
- package/dist/controls/svg/index.js +1 -0
- package/dist/controls/svg/index.js.map +1 -0
- package/dist/controls/svg/svg.d.ts +0 -0
- package/dist/controls/svg/svg.js +1 -0
- package/dist/controls/svg/svg.js.map +1 -0
- package/dist/framework/View.d.ts +62 -0
- package/dist/framework/View.js +148 -0
- package/dist/framework/View.js.map +1 -0
- package/dist/framework/ViewModel.d.ts +42 -0
- package/dist/framework/ViewModel.js +287 -0
- package/dist/framework/ViewModel.js.map +1 -0
- package/dist/framework/attributes.d.ts +90 -0
- package/dist/framework/attributes.js +2 -0
- package/dist/framework/attributes.js.map +1 -0
- package/dist/framework/event.d.ts +80 -0
- package/dist/framework/event.js +26 -0
- package/dist/framework/event.js.map +1 -0
- package/dist/framework/observable.d.ts +9 -0
- package/dist/framework/observable.js +24 -0
- package/dist/framework/observable.js.map +1 -0
- package/dist/framework/style.d.ts +658 -0
- package/dist/framework/style.js +154 -0
- package/dist/framework/style.js.map +1 -0
- package/dist/framework/types.d.ts +87 -0
- package/dist/framework/types.js +2 -0
- package/dist/framework/types.js.map +1 -0
- package/dist/framework/userAgent.d.ts +31 -0
- package/dist/framework/userAgent.js +47 -0
- package/dist/framework/userAgent.js.map +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +13 -0
- package/dist/index.js.map +1 -0
- package/dist/utilities/blob/blob.d.ts +1 -0
- package/dist/utilities/blob/blob.js +18 -0
- package/dist/utilities/blob/blob.js.map +1 -0
- package/dist/utilities/cookie/cookie.d.ts +3 -0
- package/dist/utilities/cookie/cookie.js +27 -0
- package/dist/utilities/cookie/cookie.js.map +1 -0
- package/dist/utilities/dataReaderTable/dataReaderTable.d.ts +9 -0
- package/dist/utilities/dataReaderTable/dataReaderTable.js +24 -0
- package/dist/utilities/dataReaderTable/dataReaderTable.js.map +1 -0
- package/dist/utilities/fetch/fetch.d.ts +8 -0
- package/dist/utilities/fetch/fetch.js +138 -0
- package/dist/utilities/fetch/fetch.js.map +1 -0
- package/dist/utilities/float/float.d.ts +1 -0
- package/dist/utilities/float/float.js +4 -0
- package/dist/utilities/float/float.js.map +1 -0
- package/dist/utilities/formData/formData.d.ts +1 -0
- package/dist/utilities/formData/formData.js +12 -0
- package/dist/utilities/formData/formData.js.map +1 -0
- package/dist/utilities/html/html.d.ts +1 -0
- package/dist/utilities/html/html.js +8 -0
- package/dist/utilities/html/html.js.map +1 -0
- package/dist/utilities/htmlElement/htmlElement.d.ts +1 -0
- package/dist/utilities/htmlElement/htmlElement.js +17 -0
- package/dist/utilities/htmlElement/htmlElement.js.map +1 -0
- package/dist/utilities/image/image.d.ts +1 -0
- package/dist/utilities/image/image.js +2 -0
- package/dist/utilities/image/image.js.map +1 -0
- package/dist/utilities/index.d.ts +36 -0
- package/dist/utilities/index.js +37 -0
- package/dist/utilities/index.js.map +1 -0
- package/dist/utilities/integer/integer.d.ts +3 -0
- package/dist/utilities/integer/integer.js +28 -0
- package/dist/utilities/integer/integer.js.map +1 -0
- package/dist/utilities/key/key.d.ts +2 -0
- package/dist/utilities/key/key.js +7 -0
- package/dist/utilities/key/key.js.map +1 -0
- package/dist/utilities/navigator/navigator.d.ts +1 -0
- package/dist/utilities/navigator/navigator.js +9 -0
- package/dist/utilities/navigator/navigator.js.map +1 -0
- package/dist/utilities/notification/notification.d.ts +5 -0
- package/dist/utilities/notification/notification.js +67 -0
- package/dist/utilities/notification/notification.js.map +1 -0
- package/dist/utilities/querystring/querystring.d.ts +6 -0
- package/dist/utilities/querystring/querystring.js +54 -0
- package/dist/utilities/querystring/querystring.js.map +1 -0
- package/dist/utilities/router/router.d.ts +19 -0
- package/dist/utilities/router/router.js +81 -0
- package/dist/utilities/router/router.js.map +1 -0
- package/dist/utilities/stylesheet/stylesheet.d.ts +2 -0
- package/dist/utilities/stylesheet/stylesheet.js +48 -0
- package/dist/utilities/stylesheet/stylesheet.js.map +1 -0
- package/dist/utilities/uniqueId/uniqueId.d.ts +1 -0
- package/dist/utilities/uniqueId/uniqueId.js +5 -0
- package/dist/utilities/uniqueId/uniqueId.js.map +1 -0
- package/dist/utilities/webSocket/webSocket.d.ts +1 -0
- package/dist/utilities/webSocket/webSocket.js +55 -0
- package/dist/utilities/webSocket/webSocket.js.map +1 -0
- package/package.json +62 -0
- package/src/controls/codeMirror/HtmlEditor/HtmlEditor.ts +153 -0
- package/src/controls/codeMirror/JsonEditor/JsonEditor.ts +136 -0
- package/src/controls/codeMirror/index.ts +2 -0
- package/src/controls/custom/FileSelector/FileSelector.ts +74 -0
- package/src/controls/custom/LabeledControl/LabeledControl.ts +58 -0
- package/src/controls/custom/ListItem/ListItem.ts +99 -0
- package/src/controls/custom/index.ts +3 -0
- package/src/controls/html/Button/Button.ts +70 -0
- package/src/controls/html/Div/Div.ts +41 -0
- package/src/controls/html/Image/Image.ts +46 -0
- package/src/controls/html/Input/Input.ts +228 -0
- package/src/controls/html/Select/Select.ts +146 -0
- package/src/controls/html/Span/Span.ts +38 -0
- package/src/controls/html/index.ts +6 -0
- package/src/controls/index.ts +15 -0
- package/src/controls/jsonViewAwesome/index.ts +1 -0
- package/src/controls/jsonViewAwesome/jsonFormatter/JsonFormatter.ts +91 -0
- package/src/controls/kendo/Chart/Chart.ts +97 -0
- package/src/controls/kendo/Culture/Culture.ts +32 -0
- package/src/controls/kendo/DataSource/DataSource.ts +4 -0
- package/src/controls/kendo/Dialog/Dialog.ts +64 -0
- package/src/controls/kendo/Editor/Editor.ts +142 -0
- package/src/controls/kendo/Grid/Grid.ts +291 -0
- package/src/controls/kendo/Menu/Menu.ts +125 -0
- package/src/controls/kendo/ObservableObject/ObservableObject.ts +45 -0
- package/src/controls/kendo/Tree/Tree.ts +147 -0
- package/src/controls/kendo/index.ts +9 -0
- package/src/controls/leaflet/LabelControl/LabelControl.ts +42 -0
- package/src/controls/leaflet/Map/Map.ts +180 -0
- package/src/controls/leaflet/OpenStreetMapTileLayer/OpenStreetMapTileLayer.ts +19 -0
- package/src/controls/leaflet/PointerEvent/PointerEvent.ts +9 -0
- package/src/controls/leaflet/index.ts +4 -0
- package/src/controls/svg/Circle/Circle.ts +34 -0
- package/src/controls/svg/Ellipse/Ellipse.ts +36 -0
- package/src/controls/svg/ForeignObject/ForeignObject.ts +38 -0
- package/src/controls/svg/Group/Group.ts +38 -0
- package/src/controls/svg/Line/Line.ts +36 -0
- package/src/controls/svg/Pattern/Pattern.ts +49 -0
- package/src/controls/svg/Polygon/Polygon.ts +31 -0
- package/src/controls/svg/Polyline/Polyline.ts +31 -0
- package/src/controls/svg/Rectangle/Rectangle.ts +36 -0
- package/src/controls/svg/Svg/Svg.ts +43 -0
- package/src/controls/svg/Text/Text.ts +38 -0
- package/src/controls/svg/Title/Title.ts +28 -0
- package/src/controls/svg/index.ts +13 -0
- package/src/controls/svg/svg.ts +20 -0
- package/src/framework/View.ts +226 -0
- package/src/framework/ViewModel.ts +478 -0
- package/src/framework/attributes.ts +92 -0
- package/src/framework/event.ts +98 -0
- package/src/framework/observable.ts +40 -0
- package/src/framework/style.ts +3271 -0
- package/src/framework/types.ts +277 -0
- package/src/framework/userAgent.ts +51 -0
- package/src/index.ts +14 -0
- package/src/utilities/blob/blob.ts +19 -0
- package/src/utilities/cookie/cookie.ts +28 -0
- package/src/utilities/dataReaderTable/dataReaderTable.ts +34 -0
- package/src/utilities/fetch/fetch.ts +179 -0
- package/src/utilities/float/float.ts +3 -0
- package/src/utilities/formData/formData.ts +12 -0
- package/src/utilities/html/html.ts +8 -0
- package/src/utilities/htmlElement/htmlElement.ts +15 -0
- package/src/utilities/image/image.ts +1 -0
- package/src/utilities/index.ts +37 -0
- package/src/utilities/integer/integer.ts +31 -0
- package/src/utilities/key/key.ts +7 -0
- package/src/utilities/navigator/navigator.ts +7 -0
- package/src/utilities/notification/notification.ts +88 -0
- package/src/utilities/querystring/querystring.ts +61 -0
- package/src/utilities/router/router.ts +124 -0
- package/src/utilities/stylesheet/stylesheet.ts +58 -0
- package/src/utilities/uniqueId/uniqueId.ts +5 -0
- package/src/utilities/webSocket/webSocket.ts +72 -0
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
//import { isObservable, unwrap, Observable, ObservableArray, Computed } from "knockout";
|
|
2
|
+
//import * as leaflet from "leaflet";
|
|
3
|
+
//import { View, registerView } from "../../../framework/View";
|
|
4
|
+
//import { ViewModel, Properties, extendProperties } from "../../../framework/ViewModel";
|
|
5
|
+
|
|
6
|
+
//export interface MapProperties extends Properties {
|
|
7
|
+
// renderer?: leaflet.Renderer;
|
|
8
|
+
// center?: leaflet.LatLngExpression | Observable<leaflet.LatLngExpression>;
|
|
9
|
+
// zoom?: number;
|
|
10
|
+
// south?: number;
|
|
11
|
+
// north?: number;
|
|
12
|
+
// west?: number;
|
|
13
|
+
// east?: number;
|
|
14
|
+
// tileLayers?: Array<leaflet.TileLayer>;
|
|
15
|
+
// layers?: Array<leaflet.Layer> | ObservableArray<leaflet.Layer> | Computed<Array<leaflet.Layer>>;
|
|
16
|
+
// controls?: Array<leaflet.Control> | ObservableArray<leaflet.Control>;
|
|
17
|
+
// zoomInTitle?: string;
|
|
18
|
+
// zoomOutTitle?: string;
|
|
19
|
+
//}
|
|
20
|
+
|
|
21
|
+
//export class MapView extends View<MapProperties> {
|
|
22
|
+
// constructor(properties: MapProperties) {
|
|
23
|
+
// super(
|
|
24
|
+
// {
|
|
25
|
+
// tagName: "div",
|
|
26
|
+
// properties: extendProperties(
|
|
27
|
+
// {
|
|
28
|
+
// viewType: "LeafletMap"
|
|
29
|
+
// },
|
|
30
|
+
// properties
|
|
31
|
+
// )
|
|
32
|
+
// }
|
|
33
|
+
// );
|
|
34
|
+
// }
|
|
35
|
+
|
|
36
|
+
// private map: leaflet.Map;
|
|
37
|
+
// private layers = new Array<leaflet.Layer>();
|
|
38
|
+
// private controls = new Array<leaflet.Control>();
|
|
39
|
+
|
|
40
|
+
// build(): void {
|
|
41
|
+
// super.build();
|
|
42
|
+
|
|
43
|
+
// const viewModel = this.properties;
|
|
44
|
+
// if (!viewModel.center) {
|
|
45
|
+
// viewModel.center = burtonville;
|
|
46
|
+
// }
|
|
47
|
+
|
|
48
|
+
// const options: leaflet.MapOptions = {
|
|
49
|
+
// renderer: viewModel.renderer,
|
|
50
|
+
// zoomControl: false
|
|
51
|
+
// };
|
|
52
|
+
|
|
53
|
+
// //Leaflet can not handle rendering from an element not attached to the DOM
|
|
54
|
+
// setTimeout(
|
|
55
|
+
// () => {
|
|
56
|
+
// this.map = leaflet.map(this.element, options).setView(unwrap(viewModel.center), this.properties.zoom);
|
|
57
|
+
|
|
58
|
+
// //Add the language specific zoom element
|
|
59
|
+
// leaflet.control.zoom({
|
|
60
|
+
// position: "topleft",
|
|
61
|
+
// zoomInTitle: viewModel.zoomInTitle,
|
|
62
|
+
// zoomOutTitle: viewModel.zoomOutTitle
|
|
63
|
+
// }).addTo(this.map);
|
|
64
|
+
|
|
65
|
+
// if (this.properties.eventListeners) {
|
|
66
|
+
// Object.keys(this.properties.eventListeners).forEach((key) => {
|
|
67
|
+
// this.map.on(
|
|
68
|
+
// key,
|
|
69
|
+
// (event) => {
|
|
70
|
+
// this.properties.eventListeners[key](event);
|
|
71
|
+
// }
|
|
72
|
+
// );
|
|
73
|
+
// });
|
|
74
|
+
// }
|
|
75
|
+
|
|
76
|
+
// this.setTileLayers(viewModel.tileLayers);
|
|
77
|
+
|
|
78
|
+
// this.setLayers(unwrap(viewModel.layers));
|
|
79
|
+
// if (isObservable(viewModel.layers)) {
|
|
80
|
+
// this.subscriptions.push(
|
|
81
|
+
// viewModel.layers.subscribe((layers) => {
|
|
82
|
+
// this.setLayers(layers);
|
|
83
|
+
// })
|
|
84
|
+
// );
|
|
85
|
+
// }
|
|
86
|
+
|
|
87
|
+
// this.setControls(unwrap(viewModel.controls));
|
|
88
|
+
// if (isObservable(viewModel.controls)) {
|
|
89
|
+
// this.subscriptions.push(
|
|
90
|
+
// viewModel.controls.subscribe((controls) => {
|
|
91
|
+
// this.setControls(controls);
|
|
92
|
+
// })
|
|
93
|
+
// );
|
|
94
|
+
// }
|
|
95
|
+
|
|
96
|
+
// if (isObservable(viewModel.center)) {
|
|
97
|
+
// this.subscriptions.push(
|
|
98
|
+
// viewModel.center.subscribe((center) => {
|
|
99
|
+
// this.map.panTo(center);
|
|
100
|
+
// })
|
|
101
|
+
// );
|
|
102
|
+
// }
|
|
103
|
+
// },
|
|
104
|
+
// 100
|
|
105
|
+
// );
|
|
106
|
+
// }
|
|
107
|
+
|
|
108
|
+
// private setTileLayers(tileLayers: Array<leaflet.TileLayer>) {
|
|
109
|
+
// if (tileLayers) {
|
|
110
|
+
// tileLayers.forEach((tileLayer) => {
|
|
111
|
+
// tileLayer.addTo(this.map);
|
|
112
|
+
// });
|
|
113
|
+
// }
|
|
114
|
+
// }
|
|
115
|
+
|
|
116
|
+
// private setLayers(layers: Array<leaflet.Layer>) {
|
|
117
|
+
// //Remove existing markers
|
|
118
|
+
// this.layers.forEach((layer) => {
|
|
119
|
+
// this.map.removeLayer(layer);
|
|
120
|
+
// });
|
|
121
|
+
|
|
122
|
+
// //Reset the layers array
|
|
123
|
+
// this.layers = [];
|
|
124
|
+
|
|
125
|
+
// //Add the new layers to the array and the map
|
|
126
|
+
// if (layers) {
|
|
127
|
+
// layers.forEach((layer) => {
|
|
128
|
+
// this.layers.push(layer);
|
|
129
|
+
// layer.addTo(this.map);
|
|
130
|
+
// });
|
|
131
|
+
// }
|
|
132
|
+
// }
|
|
133
|
+
|
|
134
|
+
// private setControls(controls: Array<leaflet.Control>) {
|
|
135
|
+
// //Remove existing controls
|
|
136
|
+
// this.controls.forEach((control) => {
|
|
137
|
+
// this.map.removeControl(control);
|
|
138
|
+
// });
|
|
139
|
+
|
|
140
|
+
// this.controls = [];
|
|
141
|
+
|
|
142
|
+
// if (controls) {
|
|
143
|
+
// controls.forEach((control) => {
|
|
144
|
+
// this.controls.push(control);
|
|
145
|
+
// control.addTo(this.map);
|
|
146
|
+
// });
|
|
147
|
+
// }
|
|
148
|
+
// }
|
|
149
|
+
//}
|
|
150
|
+
|
|
151
|
+
//export function mapView(properties: MapProperties) {
|
|
152
|
+
// return new MapView(properties);
|
|
153
|
+
//}
|
|
154
|
+
|
|
155
|
+
//export const burtonville: leaflet.LatLngExpression = [50.283939, 5.964070];
|
|
156
|
+
|
|
157
|
+
//export class MapViewModel extends ViewModel implements MapProperties {
|
|
158
|
+
// constructor(properties: MapProperties) {
|
|
159
|
+
// super();
|
|
160
|
+
// this.setProperties(this, properties);
|
|
161
|
+
// }
|
|
162
|
+
|
|
163
|
+
// renderer?: leaflet.Renderer;
|
|
164
|
+
// center?: leaflet.LatLngExpression | Observable<leaflet.LatLngExpression>;
|
|
165
|
+
// zoom?: number;
|
|
166
|
+
// south?: number;
|
|
167
|
+
// north?: number;
|
|
168
|
+
// west?: number;
|
|
169
|
+
// east?: number;
|
|
170
|
+
// tileLayers?: Array<leaflet.TileLayer>;
|
|
171
|
+
// layers?: Array<leaflet.Layer> | ObservableArray<leaflet.Layer> | Computed<Array<leaflet.Layer>>;
|
|
172
|
+
// controls?: Array<leaflet.Control> | ObservableArray<leaflet.Control>;
|
|
173
|
+
// zoomInTitle?: string;
|
|
174
|
+
// zoomOutTitle?: string;
|
|
175
|
+
//}
|
|
176
|
+
|
|
177
|
+
//registerView(
|
|
178
|
+
// MapViewModel,
|
|
179
|
+
// MapView
|
|
180
|
+
//);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { TileLayerOptions, TileLayer } from "leaflet";
|
|
2
|
+
|
|
3
|
+
export interface OpenStreetMapTileLayerOptions extends TileLayerOptions {
|
|
4
|
+
attribution?: string
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export class OpenStreetMapTileLayer extends TileLayer {
|
|
8
|
+
constructor(options?: OpenStreetMapTileLayerOptions) {
|
|
9
|
+
if (!options) {
|
|
10
|
+
options = {};
|
|
11
|
+
}
|
|
12
|
+
options.attribution = "© <a href=\"https://www.openstreetmap.org/copyright\">OpenStreetMap</a> contributors";
|
|
13
|
+
super("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", options);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export function openStreetMapTileLayer(options?: OpenStreetMapTileLayerOptions) {
|
|
18
|
+
return new OpenStreetMapTileLayer(options);
|
|
19
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { LeafletEvent } from "leaflet";
|
|
2
|
+
|
|
3
|
+
export function getPointerEvent(event: Event | LeafletEvent): PointerEvent {
|
|
4
|
+
const originalEvent = event["originalEvent"];
|
|
5
|
+
if (originalEvent instanceof PointerEvent) {
|
|
6
|
+
return originalEvent as PointerEvent;
|
|
7
|
+
}
|
|
8
|
+
return null;
|
|
9
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
//import { View } from "../../../framework/View";
|
|
2
|
+
//import { Properties, extendProperties} from "../../../framework/ViewModel";
|
|
3
|
+
//import { Subscribable } from "../../../framework/observable";
|
|
4
|
+
|
|
5
|
+
//export interface CircleProperties extends Properties {
|
|
6
|
+
// cx: number | string | Subscribable<number | string>;
|
|
7
|
+
// cy: number | string | Subscribable<number | string>;
|
|
8
|
+
// r: number | string | Subscribable<number | string>;
|
|
9
|
+
//}
|
|
10
|
+
|
|
11
|
+
//export class CircleView extends View<CircleProperties> {
|
|
12
|
+
// constructor(properties: CircleProperties) {
|
|
13
|
+
// super(
|
|
14
|
+
// {
|
|
15
|
+
// tagName: "circle",
|
|
16
|
+
// properties: extendProperties(
|
|
17
|
+
// {
|
|
18
|
+
// viewType: "Circle",
|
|
19
|
+
// attributes: {
|
|
20
|
+
// cx: properties.cx,
|
|
21
|
+
// cy: properties.cy,
|
|
22
|
+
// r: properties.r
|
|
23
|
+
// }
|
|
24
|
+
// },
|
|
25
|
+
// properties
|
|
26
|
+
// )
|
|
27
|
+
// }
|
|
28
|
+
// );
|
|
29
|
+
// }
|
|
30
|
+
//}
|
|
31
|
+
|
|
32
|
+
//export function circleView(properties: CircleProperties) {
|
|
33
|
+
// return new CircleView(properties);
|
|
34
|
+
//}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
//import { View } from "../../../framework/View";
|
|
2
|
+
//import { Properties, extendProperties} from "../../../framework/ViewModel";
|
|
3
|
+
//import { Subscribable } from "../../../framework/observable";
|
|
4
|
+
|
|
5
|
+
//export interface EllipseProperties extends Properties {
|
|
6
|
+
// cx: number | string | Subscribable<number | string>;
|
|
7
|
+
// cy: number | string | Subscribable<number | string>;
|
|
8
|
+
// rx: number | string | Subscribable<number | string>;
|
|
9
|
+
// ry: number | string | Subscribable<number | string>;
|
|
10
|
+
//}
|
|
11
|
+
|
|
12
|
+
//export class EllipseView extends View<EllipseProperties> {
|
|
13
|
+
// constructor(properties: EllipseProperties) {
|
|
14
|
+
// super(
|
|
15
|
+
// {
|
|
16
|
+
// tagName: "ellipse",
|
|
17
|
+
// properties: extendProperties(
|
|
18
|
+
// {
|
|
19
|
+
// viewType: "Ellipse",
|
|
20
|
+
// attributes: {
|
|
21
|
+
// cx: properties.cx,
|
|
22
|
+
// cy: properties.cy,
|
|
23
|
+
// rx: properties.rx,
|
|
24
|
+
// ry: properties.ry
|
|
25
|
+
// }
|
|
26
|
+
// },
|
|
27
|
+
// properties
|
|
28
|
+
// )
|
|
29
|
+
// }
|
|
30
|
+
// );
|
|
31
|
+
// }
|
|
32
|
+
//}
|
|
33
|
+
|
|
34
|
+
//export function ellipseView(properties: EllipseProperties) {
|
|
35
|
+
// return new EllipseView(properties);
|
|
36
|
+
//}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
//import { View, IView } from "../../../framework/View";
|
|
2
|
+
//import { Properties, extendProperties } from "../../../framework/ViewModel";
|
|
3
|
+
//import { Computed, ObservableArray, Subscribable } from "knockout;
|
|
4
|
+
|
|
5
|
+
//export interface ForeignObjectProperties extends Properties {
|
|
6
|
+
// height?: number | string | Subscribable<number | string>;
|
|
7
|
+
// width?: number | string | Subscribable<number | string>;
|
|
8
|
+
// x?: number | string | Subscribable<number | string>;
|
|
9
|
+
// y?: number | string | Subscribable<number | string>;
|
|
10
|
+
// children?: Array<IView> | ObservableArray<IView> | Computed<Array<IView>>;
|
|
11
|
+
//}
|
|
12
|
+
|
|
13
|
+
//export class ForeignObjectView extends View<ForeignObjectProperties> {
|
|
14
|
+
// constructor(properties: ForeignObjectProperties) {
|
|
15
|
+
// super(
|
|
16
|
+
// {
|
|
17
|
+
// tagName: "foreignObject",
|
|
18
|
+
// properties: extendProperties(
|
|
19
|
+
// {
|
|
20
|
+
// viewType: "ForeignObject",
|
|
21
|
+
// attributes: {
|
|
22
|
+
// height: properties.height,
|
|
23
|
+
// width: properties.width,
|
|
24
|
+
// x: properties.x,
|
|
25
|
+
// y: properties.y
|
|
26
|
+
// }
|
|
27
|
+
// },
|
|
28
|
+
// properties
|
|
29
|
+
// ),
|
|
30
|
+
// children: properties.children
|
|
31
|
+
// }
|
|
32
|
+
// );
|
|
33
|
+
// }
|
|
34
|
+
//}
|
|
35
|
+
|
|
36
|
+
//export function foreignObjectView(properties: ForeignObjectProperties) {
|
|
37
|
+
// return new ForeignObjectView(properties);
|
|
38
|
+
//}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
//import { View, IView } from "../../../framework/View";
|
|
2
|
+
//import { Properties, extendProperties } from "../../../framework/ViewModel";
|
|
3
|
+
//import { Computed, ObservableArray, Subscribable } from "knockout";
|
|
4
|
+
|
|
5
|
+
//export interface GroupProperties extends Properties {
|
|
6
|
+
// x1?: number | string | Subscribable<number | string>;
|
|
7
|
+
// x2?: number | string | Subscribable<number | string>;
|
|
8
|
+
// y1?: number | string | Subscribable<number | string>;
|
|
9
|
+
// y2?: number | string | Subscribable<number | string>;
|
|
10
|
+
// children?: Array<IView> | ObservableArray<IView> | Computed<Array<IView>>;
|
|
11
|
+
//}
|
|
12
|
+
|
|
13
|
+
//export class GroupView extends View<GroupProperties> {
|
|
14
|
+
// constructor(properties: GroupProperties) {
|
|
15
|
+
// super(
|
|
16
|
+
// {
|
|
17
|
+
// tagName: "g",
|
|
18
|
+
// properties: extendProperties(
|
|
19
|
+
// {
|
|
20
|
+
// viewType: "Group",
|
|
21
|
+
// attributes: {
|
|
22
|
+
// x1: properties.x1,
|
|
23
|
+
// x2: properties.x2,
|
|
24
|
+
// y1: properties.y1,
|
|
25
|
+
// y2: properties.y2
|
|
26
|
+
// }
|
|
27
|
+
// },
|
|
28
|
+
// properties
|
|
29
|
+
// ),
|
|
30
|
+
// children: properties.children
|
|
31
|
+
// }
|
|
32
|
+
// );
|
|
33
|
+
// }
|
|
34
|
+
//}
|
|
35
|
+
|
|
36
|
+
//export function groupView(properties: GroupProperties) {
|
|
37
|
+
// return new GroupView(properties);
|
|
38
|
+
//}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
//import { View } from "../../../framework/View";
|
|
2
|
+
//import { Properties, extendProperties } from "../../../framework/ViewModel";
|
|
3
|
+
//import { Subscribable } from "knockout";
|
|
4
|
+
|
|
5
|
+
//export interface LineProperties extends Properties {
|
|
6
|
+
// x1: number | string | Subscribable<number | string>;
|
|
7
|
+
// x2: number | string | Subscribable<number | string>;
|
|
8
|
+
// y1: number | string | Subscribable<number | string>;
|
|
9
|
+
// y2: number | string | Subscribable<number | string>;
|
|
10
|
+
//}
|
|
11
|
+
|
|
12
|
+
//export class LineView extends View<LineProperties> {
|
|
13
|
+
// constructor(properties: LineProperties) {
|
|
14
|
+
// super(
|
|
15
|
+
// {
|
|
16
|
+
// tagName: "line",
|
|
17
|
+
// properties: extendProperties(
|
|
18
|
+
// {
|
|
19
|
+
// viewType: "Line",
|
|
20
|
+
// attributes: {
|
|
21
|
+
// x1: properties.x1,
|
|
22
|
+
// x2: properties.x2,
|
|
23
|
+
// y1: properties.y1,
|
|
24
|
+
// y2: properties.y2
|
|
25
|
+
// }
|
|
26
|
+
// },
|
|
27
|
+
// properties
|
|
28
|
+
// )
|
|
29
|
+
// }
|
|
30
|
+
// );
|
|
31
|
+
// }
|
|
32
|
+
//}
|
|
33
|
+
|
|
34
|
+
//export function lineView(properties: LineProperties) {
|
|
35
|
+
// return new LineView(properties);
|
|
36
|
+
//}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
//import { View } from "../../../framework/View";
|
|
2
|
+
//import { Properties, extendProperties } from "../../../framework/ViewModel";
|
|
3
|
+
//import { Subscribable } from "knockout";
|
|
4
|
+
//import { PatternUnits } from "../../../framework/types";
|
|
5
|
+
|
|
6
|
+
//import { CircleView } from "../Circle/Circle";
|
|
7
|
+
//import { EllipseView } from "../Ellipse/Ellipse";
|
|
8
|
+
//import { LineView } from "../Line/Line";
|
|
9
|
+
//import { PolygonView } from "../Polygon/Polygon";
|
|
10
|
+
//import { PolylineView } from "../Polyline/Polyline";
|
|
11
|
+
//import { TextView } from "../Text/Text";
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
//export interface PatternProperties extends Properties {
|
|
15
|
+
// id: string;
|
|
16
|
+
// width: number | string | Subscribable<number | string>;
|
|
17
|
+
// height: number | string | Subscribable<number | string>;
|
|
18
|
+
// patternUnits: PatternUnits | Subscribable<PatternUnits>;
|
|
19
|
+
// patternTransform: string | Subscribable<string>;
|
|
20
|
+
// pattern: CircleView | EllipseView | LineView | PolygonView | PolylineView | TextView;
|
|
21
|
+
//}
|
|
22
|
+
|
|
23
|
+
//export class PatternView extends View<PatternProperties> {
|
|
24
|
+
// constructor(properties: PatternProperties) {
|
|
25
|
+
// super(
|
|
26
|
+
// {
|
|
27
|
+
// tagName: "pattern",
|
|
28
|
+
// properties: extendProperties(
|
|
29
|
+
// {
|
|
30
|
+
// viewType: "Pattern",
|
|
31
|
+
// attributes: {
|
|
32
|
+
// id: properties.id,
|
|
33
|
+
// width: properties.width,
|
|
34
|
+
// height: properties.height,
|
|
35
|
+
// patternUnits: properties.patternUnits,
|
|
36
|
+
// patternTransform: properties.patternTransform
|
|
37
|
+
// }
|
|
38
|
+
// },
|
|
39
|
+
// properties
|
|
40
|
+
// ),
|
|
41
|
+
// children: [properties.pattern]
|
|
42
|
+
// }
|
|
43
|
+
// );
|
|
44
|
+
// }
|
|
45
|
+
//}
|
|
46
|
+
|
|
47
|
+
//export function patternView(properties: PatternProperties) {
|
|
48
|
+
// return new PatternView(properties);
|
|
49
|
+
//}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
//import { View } from "../../../framework/View";
|
|
2
|
+
//import { Properties, extendProperties } from "../../../framework/ViewModel";
|
|
3
|
+
//import { Subscribable, unwrap } from "knockout";
|
|
4
|
+
//import { SvgPoint, serializePoints as getPoints } from "../svg";
|
|
5
|
+
|
|
6
|
+
//export interface PolygonProperties extends Properties {
|
|
7
|
+
// points: Array<SvgPoint> | Subscribable<Array<SvgPoint>>;
|
|
8
|
+
//}
|
|
9
|
+
|
|
10
|
+
//export class PolygonView extends View<PolygonProperties> {
|
|
11
|
+
// constructor(properties: PolygonProperties) {
|
|
12
|
+
// super(
|
|
13
|
+
// {
|
|
14
|
+
// tagName: "polygon",
|
|
15
|
+
// properties: extendProperties(
|
|
16
|
+
// {
|
|
17
|
+
// viewType: "Polygon",
|
|
18
|
+
// attributes: {
|
|
19
|
+
// points: getPoints(unwrap(properties.points))
|
|
20
|
+
// }
|
|
21
|
+
// },
|
|
22
|
+
// properties
|
|
23
|
+
// )
|
|
24
|
+
// }
|
|
25
|
+
// );
|
|
26
|
+
// }
|
|
27
|
+
//}
|
|
28
|
+
|
|
29
|
+
//export function polygonView(properties: PolygonProperties) {
|
|
30
|
+
// return new PolygonView(properties);
|
|
31
|
+
//}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
//import { View } from "../../../framework/View";
|
|
2
|
+
//import { Properties , extendProperties } from "../../../framework/ViewModel";
|
|
3
|
+
//import { Subscribable } from "knockout";
|
|
4
|
+
//import { SvgPoint, serializePoints } from "../svg";
|
|
5
|
+
|
|
6
|
+
//export interface PolylineProperties extends Properties {
|
|
7
|
+
// points: Array<SvgPoint> | Subscribable<Array<SvgPoint>>;
|
|
8
|
+
//}
|
|
9
|
+
|
|
10
|
+
//export class PolylineView extends View<PolylineProperties> {
|
|
11
|
+
// constructor(properties: PolylineProperties) {
|
|
12
|
+
// super(
|
|
13
|
+
// {
|
|
14
|
+
// tagName: "polyline",
|
|
15
|
+
// properties: extendProperties(
|
|
16
|
+
// {
|
|
17
|
+
// viewType: "Polyline",
|
|
18
|
+
// attributes: {
|
|
19
|
+
// points: serializePoints(properties.points)
|
|
20
|
+
// }
|
|
21
|
+
// },
|
|
22
|
+
// properties
|
|
23
|
+
// )
|
|
24
|
+
// }
|
|
25
|
+
// );
|
|
26
|
+
// }
|
|
27
|
+
//}
|
|
28
|
+
|
|
29
|
+
//export function polylineView(properties: PolylineProperties) {
|
|
30
|
+
// return new PolylineView(properties);
|
|
31
|
+
//}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
//import { View } from "../../../framework/View";
|
|
2
|
+
//import { Properties, extendProperties } from "../../../framework/ViewModel";
|
|
3
|
+
//import { Subscribable } from "knockout";
|
|
4
|
+
|
|
5
|
+
//export interface RectangleProperties extends Properties {
|
|
6
|
+
// x?: number | string | Subscribable<number | string>;
|
|
7
|
+
// y?: number | string | Subscribable<number | string>;
|
|
8
|
+
// width?: number | string | Subscribable<number | string>;
|
|
9
|
+
// height?: number | string | Subscribable<number | string>;
|
|
10
|
+
//}
|
|
11
|
+
|
|
12
|
+
//export class RectangleView extends View<RectangleProperties> {
|
|
13
|
+
// constructor(properties: RectangleProperties) {
|
|
14
|
+
// super(
|
|
15
|
+
// {
|
|
16
|
+
// tagName: "rect",
|
|
17
|
+
// properties: extendProperties(
|
|
18
|
+
// {
|
|
19
|
+
// viewType: "Rectangle",
|
|
20
|
+
// attributes: {
|
|
21
|
+
// x: properties.x,
|
|
22
|
+
// y: properties.y,
|
|
23
|
+
// width: properties.width,
|
|
24
|
+
// height: properties.height
|
|
25
|
+
// }
|
|
26
|
+
// },
|
|
27
|
+
// properties
|
|
28
|
+
// )
|
|
29
|
+
// }
|
|
30
|
+
// );
|
|
31
|
+
// }
|
|
32
|
+
//}
|
|
33
|
+
|
|
34
|
+
//export function rectangleView(properties: RectangleProperties) {
|
|
35
|
+
// return new RectangleView(properties);
|
|
36
|
+
//}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
//import { View, IView } from "../../../framework/View";
|
|
2
|
+
//import { Properties, extendProperties } from "../../../framework/ViewModel";
|
|
3
|
+
//import { ObservableArray, Computed, Subscribable } from "knockout";
|
|
4
|
+
//import { PreserveAspectRatio } from "../../../framework/types";
|
|
5
|
+
|
|
6
|
+
//export interface SvgProperties extends Properties {
|
|
7
|
+
// x?: number | string | Subscribable<number | string>;
|
|
8
|
+
// y?: number | string | Subscribable<number | string>;
|
|
9
|
+
// height?: number | string | Subscribable<number | string>;
|
|
10
|
+
// width?: number | string | Subscribable<number | string>;
|
|
11
|
+
// viewBox?: string;
|
|
12
|
+
// preserveAspectRatio?: PreserveAspectRatio | Subscribable<PreserveAspectRatio>;
|
|
13
|
+
// children?: Array<IView> | ObservableArray<IView> | Computed<Array<IView>>;
|
|
14
|
+
//}
|
|
15
|
+
|
|
16
|
+
//export class SvgView extends View<SvgProperties> {
|
|
17
|
+
// constructor(properties: SvgProperties) {
|
|
18
|
+
// super(
|
|
19
|
+
// {
|
|
20
|
+
// tagName: "svg",
|
|
21
|
+
// properties: extendProperties(
|
|
22
|
+
// {
|
|
23
|
+
// viewType: "Svg",
|
|
24
|
+
// attributes: {
|
|
25
|
+
// x: properties.x,
|
|
26
|
+
// y: properties.y,
|
|
27
|
+
// height: properties.height,
|
|
28
|
+
// width: properties.width,
|
|
29
|
+
// viewBox: properties.viewBox,
|
|
30
|
+
// preserveAspectRatio: properties.preserveAspectRatio
|
|
31
|
+
// }
|
|
32
|
+
// },
|
|
33
|
+
// properties
|
|
34
|
+
// ),
|
|
35
|
+
// children: properties.children
|
|
36
|
+
// },
|
|
37
|
+
// );
|
|
38
|
+
// }
|
|
39
|
+
//}
|
|
40
|
+
|
|
41
|
+
//export function svgView(properties: SvgProperties) {
|
|
42
|
+
// return new SvgView(properties);
|
|
43
|
+
//}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
//import { View } from "../../../framework/View";
|
|
2
|
+
//import { Properties, extendProperties } from "../../../framework/ViewModel";
|
|
3
|
+
//import { Subscribable } from "knockout";
|
|
4
|
+
|
|
5
|
+
//export interface TextProperties extends Properties {
|
|
6
|
+
// x?: number | string | Subscribable<number | string>;
|
|
7
|
+
// y?: number | string | Subscribable<number | string>;
|
|
8
|
+
// dx?: number | string | Subscribable<number | string>;
|
|
9
|
+
// dy?: number | string | Subscribable<number | string>;
|
|
10
|
+
// rotate?: string | Subscribable<string>;
|
|
11
|
+
//}
|
|
12
|
+
|
|
13
|
+
//export class TextView extends View<TextProperties> {
|
|
14
|
+
// constructor(properties: TextProperties) {
|
|
15
|
+
// super(
|
|
16
|
+
// {
|
|
17
|
+
// tagName: "text",
|
|
18
|
+
// properties: extendProperties(
|
|
19
|
+
// {
|
|
20
|
+
// viewType: "Text",
|
|
21
|
+
// attributes: {
|
|
22
|
+
// x: properties.x,
|
|
23
|
+
// y: properties.y,
|
|
24
|
+
// dx: properties.dx,
|
|
25
|
+
// dy: properties.dy,
|
|
26
|
+
// rotate: properties.rotate
|
|
27
|
+
// }
|
|
28
|
+
// },
|
|
29
|
+
// properties
|
|
30
|
+
// )
|
|
31
|
+
// }
|
|
32
|
+
// );
|
|
33
|
+
// }
|
|
34
|
+
//}
|
|
35
|
+
|
|
36
|
+
//export function textView(properties: TextProperties) {
|
|
37
|
+
// return new TextView(properties);
|
|
38
|
+
//}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
//import { View } from "../../../framework/View";
|
|
2
|
+
//import { Properties, extendProperties } from "../../../framework/ViewModel";
|
|
3
|
+
//import { Subscribable } from "knockout";
|
|
4
|
+
|
|
5
|
+
//export interface TitleProperties extends Properties{
|
|
6
|
+
// title: string | Subscribable<string>
|
|
7
|
+
//}
|
|
8
|
+
|
|
9
|
+
//export class TitleView extends View<TitleProperties> {
|
|
10
|
+
// constructor(properties: TitleProperties) {
|
|
11
|
+
// super(
|
|
12
|
+
// {
|
|
13
|
+
// tagName: "title",
|
|
14
|
+
// properties: extendProperties(
|
|
15
|
+
// {
|
|
16
|
+
// viewType: "Title",
|
|
17
|
+
// textContent: properties.title
|
|
18
|
+
// },
|
|
19
|
+
// properties
|
|
20
|
+
// )
|
|
21
|
+
// }
|
|
22
|
+
// );
|
|
23
|
+
// }
|
|
24
|
+
//}
|
|
25
|
+
|
|
26
|
+
//export function titleView(properties: TitleProperties) {
|
|
27
|
+
// return new TitleView(properties);
|
|
28
|
+
//}
|