neo.mjs 4.4.15 → 4.4.16
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/examples/component/wrapper/googleMaps/MainContainer.mjs +8 -6
- package/examples/component/wrapper/googleMaps/MainContainerController.mjs +3 -3
- package/examples/component/wrapper/googleMaps/MapComponent.mjs +4 -12
- package/examples/component/wrapper/googleMaps/{MarkerPopup.mjs → MarkerDialog.mjs} +7 -7
- package/package.json +1 -1
- package/src/container/Base.mjs +1 -1
- package/src/toolbar/Base.mjs +1 -1
- package/examples/component/wrapper/googleMaps/MapComponentController.mjs +0 -26
@@ -1,7 +1,7 @@
|
|
1
|
-
import Button from '../../../../
|
2
|
-
import NumberField from '../../../../
|
3
|
-
import Toolbar from '../../../../
|
4
|
-
import Viewport from '../../../../
|
1
|
+
import Button from '../../../../src/button/Base.mjs';
|
2
|
+
import NumberField from '../../../../src/form/field/Number.mjs';
|
3
|
+
import Toolbar from '../../../../src/toolbar/Base.mjs';
|
4
|
+
import Viewport from '../../../../src/container/Viewport.mjs';
|
5
5
|
import MapComponent from "./MapComponent.mjs";
|
6
6
|
import MainContainerController from './MainContainerController.mjs';
|
7
7
|
|
@@ -19,6 +19,7 @@ class MainContainer extends Viewport {
|
|
19
19
|
items: [{
|
20
20
|
module : MapComponent,
|
21
21
|
flex : 1,
|
22
|
+
listeners: {zoomChange: 'onMapZoomChange'},
|
22
23
|
reference: 'google-maps-component'
|
23
24
|
}, {
|
24
25
|
module: Toolbar,
|
@@ -32,10 +33,11 @@ class MainContainer extends Viewport {
|
|
32
33
|
text : 'Fly to San Fran'
|
33
34
|
}, {
|
34
35
|
module : Button,
|
35
|
-
handler: '
|
36
|
+
handler: 'onFlyToIcelandButtonClick',
|
36
37
|
height : 27,
|
37
38
|
iconCls: 'fa-solid fa-plane',
|
38
|
-
|
39
|
+
style : {marginLeft: '10px'},
|
40
|
+
text : 'Fly to Iceland'
|
39
41
|
}, {
|
40
42
|
module : NumberField,
|
41
43
|
clearToOriginalValue: true,
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import ComponentController from '../../../../
|
1
|
+
import ComponentController from '../../../../src/controller/Component.mjs';
|
2
2
|
|
3
3
|
/**
|
4
4
|
* @class Neo.examples.component.wrapper.googleMaps.MainContainerController
|
@@ -23,14 +23,14 @@ class MainContainerController extends ComponentController {
|
|
23
23
|
/**
|
24
24
|
* @param {Object} data
|
25
25
|
*/
|
26
|
-
|
26
|
+
onFlyToIcelandButtonClick(data) {
|
27
27
|
this.getReference('google-maps-component').panTo({ lat: 64.963051,lng: -19.020835})
|
28
28
|
}
|
29
29
|
|
30
30
|
/**
|
31
31
|
* @param {Object} data
|
32
32
|
*/
|
33
|
-
|
33
|
+
onMapZoomChange(data) {
|
34
34
|
this.getReference('zoom-field').value = data.value;
|
35
35
|
}
|
36
36
|
|
@@ -1,6 +1,5 @@
|
|
1
|
-
import GoogleMapsComponent
|
2
|
-
import
|
3
|
-
import MarkerPopup from "./MarkerPopup.mjs";
|
1
|
+
import GoogleMapsComponent from '../../../../src/component/wrapper/GoogleMaps.mjs';
|
2
|
+
import MarkerDialog from './MarkerDialog.mjs';
|
4
3
|
|
5
4
|
/**
|
6
5
|
* @class Neo.examples.component.wrapper.googleMaps.MapComponent
|
@@ -11,8 +10,6 @@ class MapComponent extends GoogleMapsComponent {
|
|
11
10
|
className: 'Neo.examples.component.wrapper.googleMaps.MapComponent',
|
12
11
|
ntype: 'worldmap',
|
13
12
|
|
14
|
-
controller: MapComponentController,
|
15
|
-
|
16
13
|
// Center the map initially to Island
|
17
14
|
center: {
|
18
15
|
lat: 64.963051,
|
@@ -51,18 +48,13 @@ class MapComponent extends GoogleMapsComponent {
|
|
51
48
|
|
52
49
|
me.disabled = true;
|
53
50
|
|
54
|
-
me.dialog = Neo.create(
|
51
|
+
me.dialog = Neo.create(MarkerDialog, {
|
55
52
|
appName : me.appName,
|
56
53
|
record : record,
|
57
54
|
domEvent : data.domEvent,
|
58
55
|
boundaryContainerId : me.id
|
59
56
|
});
|
60
|
-
}
|
61
|
-
|
62
|
-
// todo Not working
|
63
|
-
// listeners: {
|
64
|
-
// zoomChange: 'onMapZoomChance'
|
65
|
-
// }
|
57
|
+
}
|
66
58
|
}}
|
67
59
|
|
68
60
|
construct(config) {
|
@@ -1,12 +1,12 @@
|
|
1
|
-
import DialogBase from '../../../../
|
1
|
+
import DialogBase from '../../../../src/dialog/Base.mjs';
|
2
2
|
|
3
3
|
/**
|
4
|
-
* @class Neo.examples.component.wrapper.googleMaps.
|
5
|
-
* @extends Neo.
|
4
|
+
* @class Neo.examples.component.wrapper.googleMaps.MarkerDialog
|
5
|
+
* @extends Neo.dialog.Base
|
6
6
|
*/
|
7
|
-
class
|
7
|
+
class MarkerDialog extends DialogBase {
|
8
8
|
static getConfig() {return {
|
9
|
-
className: 'Neo.examples.component.wrapper.googleMaps.
|
9
|
+
className: 'Neo.examples.component.wrapper.googleMaps.MarkerDialog',
|
10
10
|
|
11
11
|
// turn off dragging and resizing
|
12
12
|
draggable : false,
|
@@ -108,6 +108,6 @@ class MarkerPopup extends DialogBase {
|
|
108
108
|
}
|
109
109
|
}
|
110
110
|
|
111
|
-
Neo.applyClassConfig(
|
111
|
+
Neo.applyClassConfig(MarkerDialog);
|
112
112
|
|
113
|
-
export default
|
113
|
+
export default MarkerDialog;
|
package/package.json
CHANGED
package/src/container/Base.mjs
CHANGED
@@ -188,7 +188,7 @@ class Base extends Component {
|
|
188
188
|
createItem(item, index) {
|
189
189
|
let me = this,
|
190
190
|
config = {appName: me.appName, parentId: me.id, parentIndex: index},
|
191
|
-
defaults = me.itemDefaults,
|
191
|
+
defaults = {...me.itemDefaults},
|
192
192
|
lazyLoadItem, module;
|
193
193
|
|
194
194
|
if (defaults) {
|
package/src/toolbar/Base.mjs
CHANGED
@@ -1,26 +0,0 @@
|
|
1
|
-
import ComponentController from '../../../../node_modules/neo.mjs/src/controller/Component.mjs';
|
2
|
-
|
3
|
-
/**
|
4
|
-
* @class Neo.examples.component.wrapper.googleMaps.MainContainerController
|
5
|
-
* @extends Neo.controller.Component
|
6
|
-
*/
|
7
|
-
class MapComponentController extends ComponentController {
|
8
|
-
static getConfig() {return {
|
9
|
-
/**
|
10
|
-
* @member {String} className='Neo.examples.component.wrapper.googleMaps.MapComponentController'
|
11
|
-
* @protected
|
12
|
-
*/
|
13
|
-
className: 'Neo.examples.component.wrapper.googleMaps.MapComponentController'
|
14
|
-
}}
|
15
|
-
|
16
|
-
/**
|
17
|
-
* @param {Object} data
|
18
|
-
*/
|
19
|
-
onMapZoomChance(data) {
|
20
|
-
this.getReference('zoom-field').value = data.value;
|
21
|
-
}
|
22
|
-
}
|
23
|
-
|
24
|
-
Neo.applyClassConfig(MapComponentController);
|
25
|
-
|
26
|
-
export default MapComponentController;
|