neo.mjs 6.17.1 → 6.18.0
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/apps/ServiceWorker.mjs +3 -5
- package/apps/colors/README.md +8 -0
- package/apps/colors/app.mjs +6 -0
- package/apps/colors/childapps/widget/app.mjs +7 -0
- package/apps/colors/childapps/widget/index.html +11 -0
- package/apps/colors/childapps/widget/neo-config.json +10 -0
- package/apps/colors/childapps/widget/view/Viewport.mjs +19 -0
- package/apps/colors/index.html +11 -0
- package/apps/colors/model/Color.mjs +43 -0
- package/apps/colors/neo-config.json +10 -0
- package/apps/colors/remotes-api.json +13 -0
- package/apps/colors/store/Colors.mjs +24 -0
- package/apps/colors/view/BarChartComponent.mjs +64 -0
- package/apps/colors/view/HeaderToolbar.mjs +95 -0
- package/apps/colors/view/PieChartComponent.mjs +58 -0
- package/apps/colors/view/TableContainer.mjs +91 -0
- package/apps/colors/view/Viewport.mjs +57 -0
- package/apps/colors/view/ViewportController.mjs +277 -0
- package/apps/colors/view/ViewportModel.mjs +53 -0
- package/apps/portal/Util.mjs +11 -0
- package/apps/portal/childapps/preview/neo-config.json +2 -2
- package/apps/portal/neo-config.json +2 -1
- package/apps/portal/remotes-api.json +13 -0
- package/apps/portal/view/HeaderToolbar.mjs +44 -27
- package/apps/portal/view/Viewport.mjs +12 -1
- package/apps/portal/view/ViewportController.mjs +89 -1
- package/apps/portal/view/home/MainContainer.mjs +27 -60
- package/apps/portal/view/home/parts/AfterMath.mjs +58 -0
- package/apps/portal/view/home/parts/Colors.mjs +74 -0
- package/apps/portal/view/home/parts/Features.mjs +52 -0
- package/apps/portal/view/home/parts/Helix.mjs +75 -0
- package/apps/portal/view/home/parts/HelloWorld.mjs +82 -0
- package/apps/portal/view/home/parts/MainNeo.mjs +55 -0
- package/apps/portal/view/home/preview/PageCodeContainer.mjs +55 -0
- package/apps/portal/view/learn/LivePreview.mjs +72 -29
- package/apps/portal/view/learn/MainContainerController.mjs +10 -90
- package/apps/realworld/api/Article.mjs +1 -3
- package/apps/realworld/api/Favorite.mjs +1 -3
- package/apps/realworld/api/Profile.mjs +1 -3
- package/apps/realworld/api/Tag.mjs +1 -3
- package/apps/realworld/api/User.mjs +1 -3
- package/apps/realworld2/api/Article.mjs +1 -3
- package/apps/realworld2/api/Favorite.mjs +1 -3
- package/apps/realworld2/api/Profile.mjs +1 -3
- package/apps/realworld2/api/Tag.mjs +1 -3
- package/apps/realworld2/api/User.mjs +1 -3
- package/apps/realworld2/view/article/HelixContainer.mjs +5 -5
- package/buildScripts/webpack/json/myApps.template.json +1 -0
- package/buildScripts/webpack/webpack.server.config.mjs +4 -1
- package/docs/app/view/MainContainer.mjs +5 -0
- package/docs/app/view/classdetails/MembersList.mjs +1 -1
- package/examples/ServiceWorker.mjs +3 -5
- package/examples/component/helix/Viewport.mjs +309 -0
- package/examples/component/helix/ViewportController.mjs +122 -0
- package/examples/component/helix/app.mjs +2 -2
- package/examples/component/helix/neo-config.json +0 -1
- package/examples/component/multiWindowHelix/Viewport.mjs +11 -3
- package/examples/component/multiWindowHelix/ViewportController.mjs +21 -9
- package/examples/component/multiWindowHelix/neo-config.json +0 -1
- package/examples/fieldWithPrefix/MainContainer.mjs +1 -6
- package/examples/list/animate/MainContainerController.mjs +1 -1
- package/examples/worker/task/MyTasks.mjs +1 -3
- package/package.json +5 -5
- package/resources/data/deck/learnneo/pages/GuideEvents.md +131 -0
- package/resources/data/deck/learnneo/pages/WhyNeo-Speed.md +1 -1
- package/resources/images/logo/neo_logo_primary.svg +6 -0
- package/resources/images/logo/neo_logo_secondary.svg +6 -0
- package/resources/images/logo/neo_logo_text_primary.svg +5 -0
- package/resources/images/logo/neo_logo_text_secondary.svg +5 -0
- package/resources/images/logo/neo_logo_white.svg +6 -0
- package/resources/scss/src/apps/colors/BarChartComponent.scss +3 -0
- package/resources/scss/src/apps/colors/HeaderToolbar.scss +11 -0
- package/resources/scss/src/apps/colors/PieChartComponent.scss +3 -0
- package/resources/scss/src/apps/colors/TableContainer.scss +64 -0
- package/resources/scss/src/apps/colors/Viewport.scss +9 -0
- package/resources/scss/src/apps/portal/HeaderToolbar.scss +189 -17
- package/resources/scss/src/apps/portal/home/MainContainer.scss +46 -20
- package/resources/scss/src/apps/portal/home/parts/Features.scss +3 -0
- package/resources/scss/src/apps/portal/home/preview/PageCodeContainer.scss +115 -0
- package/resources/scss/src/component/Base.scss +2 -0
- package/resources/scss/src/examples/component/multiWindowHelix/Viewport.scss +3 -0
- package/resources/scss/src/form/field/CheckBox.scss +1 -0
- package/resources/scss/src/tab/header/Button.scss +2 -1
- package/resources/scss/theme-dark/Global.scss +8 -0
- package/resources/scss/theme-dark/button/Base.scss +1 -1
- package/resources/scss/theme-dark/tab/header/Button.scss +1 -0
- package/resources/scss/theme-light/Global.scss +8 -0
- package/resources/scss/theme-light/button/Base.scss +1 -1
- package/resources/scss/theme-light/tab/header/Button.scss +1 -0
- package/resources/scss/theme-neo-light/Global.scss +53 -53
- package/resources/scss/theme-neo-light/button/Base.scss +3 -4
- package/resources/scss/theme-neo-light/tab/header/Button.scss +6 -8
- package/src/DefaultConfig.mjs +2 -2
- package/src/Fetch.mjs +1 -3
- package/src/Main.mjs +13 -11
- package/src/MicroLoader.mjs +2 -2
- package/src/Neo.mjs +27 -26
- package/src/Xhr.mjs +1 -3
- package/src/button/Base.mjs +6 -4
- package/src/button/Split.mjs +10 -9
- package/src/calendar/view/EditEventContainer.mjs +13 -12
- package/src/calendar/view/MainContainer.mjs +40 -40
- package/src/calendar/view/MainContainerModel.mjs +5 -5
- package/src/calendar/view/SettingsContainer.mjs +11 -11
- package/src/calendar/view/YearComponent.mjs +73 -75
- package/src/calendar/view/calendars/ColorsList.mjs +2 -2
- package/src/calendar/view/calendars/EditContainer.mjs +2 -2
- package/src/calendar/view/calendars/List.mjs +12 -13
- package/src/calendar/view/month/Component.mjs +72 -73
- package/src/calendar/view/settings/GeneralContainer.mjs +5 -5
- package/src/calendar/view/settings/MonthContainer.mjs +5 -5
- package/src/calendar/view/settings/WeekContainer.mjs +6 -6
- package/src/calendar/view/settings/YearContainer.mjs +4 -4
- package/src/calendar/view/week/Component.mjs +47 -57
- package/src/calendar/view/week/EventDragZone.mjs +43 -50
- package/src/calendar/view/week/TimeAxisComponent.mjs +21 -21
- package/src/calendar/view/week/plugin/DragDrop.mjs +53 -45
- package/src/calendar/view/week/plugin/EventResizable.mjs +8 -3
- package/src/collection/Base.mjs +15 -22
- package/src/collection/Filter.mjs +4 -9
- package/src/collection/Sorter.mjs +6 -7
- package/src/component/Base.mjs +149 -87
- package/src/component/Canvas.mjs +9 -9
- package/src/component/Carousel.mjs +31 -33
- package/src/component/Chip.mjs +9 -9
- package/src/component/Circle.mjs +84 -91
- package/src/component/Clock.mjs +8 -8
- package/src/component/DateSelector.mjs +14 -15
- package/src/component/Gallery.mjs +82 -80
- package/src/component/Helix.mjs +131 -126
- package/src/component/Iframe.mjs +1 -1
- package/src/component/Label.mjs +1 -1
- package/src/component/Legend.mjs +3 -3
- package/src/component/Process.mjs +39 -37
- package/src/component/Splitter.mjs +9 -11
- package/src/component/StatusBadge.mjs +2 -3
- package/src/component/Timer.mjs +62 -68
- package/src/component/Toast.mjs +11 -11
- package/src/component/Video.mjs +7 -8
- package/src/component/mwc/Button.mjs +10 -10
- package/src/component/mwc/TextField.mjs +17 -17
- package/src/component/wrapper/AmChart.mjs +5 -5
- package/src/component/wrapper/CesiumJS.mjs +11 -17
- package/src/component/wrapper/GoogleMaps.mjs +58 -35
- package/src/component/wrapper/MapboxGL.mjs +112 -79
- package/src/component/wrapper/MonacoEditor.mjs +1 -6
- package/src/container/Accordion.mjs +18 -20
- package/src/container/AccordionItem.mjs +12 -11
- package/src/container/Base.mjs +29 -28
- package/src/container/Panel.mjs +9 -9
- package/src/container/Viewport.mjs +30 -1
- package/src/controller/Base.mjs +12 -14
- package/src/controller/Component.mjs +60 -66
- package/src/core/Base.mjs +5 -8
- package/src/core/IdGenerator.mjs +1 -3
- package/src/core/Observable.mjs +17 -17
- package/src/core/Util.mjs +5 -5
- package/src/data/Model.mjs +3 -3
- package/src/data/RecordFactory.mjs +3 -6
- package/src/data/Store.mjs +34 -34
- package/src/data/connection/Fetch.mjs +3 -3
- package/src/data/connection/WebSocket.mjs +21 -25
- package/src/data/connection/Xhr.mjs +31 -28
- package/src/date/DayViewComponent.mjs +1 -1
- package/src/date/SelectorContainer.mjs +2 -2
- package/src/dialog/Base.mjs +27 -25
- package/src/dialog/header/Toolbar.mjs +5 -4
- package/src/draggable/DragProxyComponent.mjs +7 -4
- package/src/draggable/DragZone.mjs +30 -30
- package/src/draggable/DropZone.mjs +7 -7
- package/src/draggable/list/DragZone.mjs +18 -18
- package/src/draggable/tab/header/toolbar/SortZone.mjs +7 -7
- package/src/draggable/toolbar/DragZone.mjs +15 -15
- package/src/draggable/toolbar/SortZone.mjs +30 -31
- package/src/draggable/tree/DragZone.mjs +9 -9
- package/src/filter/BooleanContainer.mjs +3 -3
- package/src/filter/NumberContainer.mjs +5 -5
- package/src/filter/ToggleOperatorsButton.mjs +5 -5
- package/src/form/Fieldset.mjs +26 -26
- package/src/form/field/Base.mjs +1 -1
- package/src/form/field/CheckBox.mjs +15 -16
- package/src/form/field/Color.mjs +13 -15
- package/src/form/field/ComboBox.mjs +16 -24
- package/src/form/field/Country.mjs +1 -1
- package/src/form/field/Date.mjs +3 -4
- package/src/form/field/Display.mjs +1 -1
- package/src/form/field/Email.mjs +2 -2
- package/src/form/field/Number.mjs +51 -56
- package/src/form/field/Picker.mjs +2 -2
- package/src/form/field/Radio.mjs +1 -1
- package/src/form/field/Range.mjs +7 -6
- package/src/form/field/Text.mjs +29 -36
- package/src/form/field/TextArea.mjs +9 -9
- package/src/form/field/Time.mjs +30 -30
- package/src/form/field/trigger/Base.mjs +19 -13
- package/src/form/field/trigger/Clear.mjs +13 -13
- package/src/form/field/trigger/CopyToClipboard.mjs +7 -7
- package/src/form/field/trigger/Picker.mjs +2 -2
- package/src/form/field/trigger/SpinDown.mjs +1 -1
- package/src/form/field/trigger/SpinUp.mjs +1 -1
- package/src/form/field/trigger/SpinUpDown.mjs +3 -3
- package/src/form/field/trigger/Time.mjs +3 -3
- package/src/grid/Container.mjs +33 -33
- package/src/grid/View.mjs +20 -22
- package/src/grid/header/Button.mjs +12 -12
- package/src/grid/header/Toolbar.mjs +4 -4
- package/src/layout/Base.mjs +5 -4
- package/src/layout/Card.mjs +15 -16
- package/src/layout/Fit.mjs +22 -8
- package/src/layout/Flexbox.mjs +30 -29
- package/src/layout/Form.mjs +15 -15
- package/src/layout/Grid.mjs +2 -2
- package/src/layout/HBox.mjs +3 -2
- package/src/layout/VBox.mjs +3 -2
- package/src/list/Base.mjs +45 -47
- package/src/list/Chip.mjs +4 -4
- package/src/list/Circle.mjs +3 -3
- package/src/list/Color.mjs +4 -4
- package/src/list/Component.mjs +10 -10
- package/src/list/plugin/Animate.mjs +18 -13
- package/src/main/DomAccess.mjs +92 -56
- package/src/main/DomEvents.mjs +38 -39
- package/src/main/addon/AmCharts.mjs +37 -37
- package/src/main/addon/AnalyticsByGoogle.mjs +4 -4
- package/src/main/addon/CesiumJS.mjs +8 -8
- package/src/main/addon/CloneNode.mjs +5 -5
- package/src/main/addon/Cookie.mjs +4 -4
- package/src/main/addon/DragDrop.mjs +35 -34
- package/src/main/addon/GoogleMaps.mjs +19 -19
- package/src/main/addon/LocalStorage.mjs +3 -3
- package/src/main/addon/MapboxGL.mjs +40 -41
- package/src/main/addon/MonacoEditor.mjs +5 -5
- package/src/main/addon/Mwc.mjs +6 -6
- package/src/main/addon/Navigator.mjs +35 -39
- package/src/main/addon/Popover.mjs +5 -6
- package/src/main/addon/PrefixField.mjs +1 -2
- package/src/main/addon/ServiceWorker.mjs +9 -9
- package/src/main/addon/Siesta.mjs +3 -2
- package/src/main/addon/Stylesheet.mjs +37 -37
- package/src/main/addon/WebComponent.mjs +2 -3
- package/src/main/addon/WindowPosition.mjs +18 -18
- package/src/main/draggable/sensor/Base.mjs +2 -2
- package/src/main/draggable/sensor/Mouse.mjs +15 -15
- package/src/main/draggable/sensor/Touch.mjs +24 -23
- package/src/main/mixin/DeltaUpdates.mjs +10 -12
- package/src/main/mixin/TouchDomEvents.mjs +6 -6
- package/src/manager/Base.mjs +4 -4
- package/src/manager/Component.mjs +41 -41
- package/src/manager/DomEvent.mjs +52 -50
- package/src/manager/Focus.mjs +14 -16
- package/src/manager/Instance.mjs +2 -4
- package/src/manager/Store.mjs +4 -8
- package/src/manager/Task.mjs +20 -22
- package/src/manager/Toast.mjs +14 -16
- package/src/manager/rpc/Api.mjs +1 -3
- package/src/manager/rpc/Message.mjs +16 -18
- package/src/menu/List.mjs +16 -16
- package/src/menu/Panel.mjs +4 -4
- package/src/model/Component.mjs +5 -5
- package/src/plugin/Base.mjs +2 -0
- package/src/plugin/Popover.mjs +1 -1
- package/src/plugin/PrefixField.mjs +35 -45
- package/src/plugin/Resizable.mjs +86 -101
- package/src/plugin/Responsive.mjs +175 -0
- package/src/remotes/Api.mjs +4 -6
- package/src/selection/CircleModel.mjs +12 -16
- package/src/selection/DateSelectorModel.mjs +21 -23
- package/src/selection/GalleryModel.mjs +49 -63
- package/src/selection/HelixModel.mjs +35 -41
- package/src/selection/ListModel.mjs +9 -14
- package/src/selection/Model.mjs +31 -31
- package/src/selection/TreeAccordionModel.mjs +74 -80
- package/src/selection/grid/CellColumnModel.mjs +10 -10
- package/src/selection/grid/CellColumnRowModel.mjs +10 -10
- package/src/selection/grid/CellModel.mjs +26 -28
- package/src/selection/grid/CellRowModel.mjs +24 -24
- package/src/selection/grid/ColumnModel.mjs +16 -20
- package/src/selection/grid/RowModel.mjs +27 -29
- package/src/selection/menu/ListModel.mjs +2 -2
- package/src/selection/table/CellColumnModel.mjs +12 -12
- package/src/selection/table/CellColumnRowModel.mjs +12 -12
- package/src/selection/table/CellModel.mjs +26 -29
- package/src/selection/table/CellRowModel.mjs +19 -19
- package/src/selection/table/ColumnModel.mjs +18 -22
- package/src/selection/table/RowModel.mjs +27 -29
- package/src/sitemap/Component.mjs +20 -20
- package/src/sitemap/Store.mjs +1 -1
- package/src/tab/Container.mjs +15 -15
- package/src/tab/Strip.mjs +1 -1
- package/src/tab/header/Toolbar.mjs +4 -4
- package/src/table/Container.mjs +8 -10
- package/src/table/View.mjs +29 -34
- package/src/table/header/Button.mjs +18 -18
- package/src/table/header/Toolbar.mjs +2 -2
- package/src/toolbar/Base.mjs +14 -14
- package/src/toolbar/Breadcrumb.mjs +11 -11
- package/src/toolbar/Paging.mjs +18 -18
- package/src/tooltip/Base.mjs +20 -22
- package/src/tree/Accordion.mjs +69 -75
- package/src/tree/List.mjs +22 -25
- package/src/util/Array.mjs +19 -18
- package/src/util/ClassSystem.mjs +9 -9
- package/src/util/Css.mjs +2 -2
- package/src/util/Date.mjs +9 -9
- package/src/util/Function.mjs +2 -2
- package/src/util/HashHistory.mjs +3 -5
- package/src/util/KeyNavigation.mjs +17 -17
- package/src/util/Logger.mjs +9 -9
- package/src/util/Matrix.mjs +19 -19
- package/src/util/String.mjs +9 -9
- package/src/util/Style.mjs +11 -11
- package/src/util/VDom.mjs +12 -14
- package/src/util/VNode.mjs +29 -29
- package/src/vdom/Helper.mjs +84 -93
- package/src/vdom/VNode.mjs +1 -1
- package/src/worker/App.mjs +19 -16
- package/src/worker/Base.mjs +14 -15
- package/src/worker/Canvas.mjs +1 -3
- package/src/worker/Data.mjs +4 -8
- package/src/worker/Manager.mjs +27 -32
- package/src/worker/Message.mjs +1 -1
- package/src/worker/ServiceBase.mjs +38 -42
- package/src/worker/Task.mjs +1 -3
- package/src/worker/VDom.mjs +2 -4
- package/src/worker/mixin/RemoteMethodAccess.mjs +5 -6
- package/examples/component/helix/MainContainer.mjs +0 -340
- package/resources/images/Neo_Vector.svg +0 -3
- package/resources/images/logos/Github-logo-black.svg +0 -1
- package/resources/images/logos/Slack-logo-black.svg +0 -17
package/src/plugin/Resizable.mjs
CHANGED
@@ -183,24 +183,20 @@ class Resizable extends Base {
|
|
183
183
|
{mousemove : me.onMouseMove, scope: me, local : true},
|
184
184
|
{mouseleave : me.onMouseLeave, scope: me, delegate: `.${me.delegationCls}`},
|
185
185
|
{mouseup : me.onMouseUp, scope: me, delegate: '.neo-resizable'}
|
186
|
-
])
|
186
|
+
])
|
187
187
|
}
|
188
188
|
|
189
189
|
/**
|
190
190
|
*
|
191
191
|
*/
|
192
192
|
addBodyCursorCls() {
|
193
|
-
Neo.
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
cls: {
|
199
|
-
add : [`neo-cursor-${Resizable.cursorPositions[Resizable.positions.indexOf(this.currentNodeName)]}-resize`],
|
200
|
-
remove: []
|
201
|
-
}
|
193
|
+
Neo.applyDeltas(this.appName, {
|
194
|
+
id : 'document.body',
|
195
|
+
cls: {
|
196
|
+
add : [`neo-cursor-${Resizable.cursorPositions[Resizable.positions.indexOf(this.currentNodeName)]}-resize`],
|
197
|
+
remove: []
|
202
198
|
}
|
203
|
-
})
|
199
|
+
})
|
204
200
|
}
|
205
201
|
|
206
202
|
/**
|
@@ -208,9 +204,9 @@ class Resizable extends Base {
|
|
208
204
|
* @returns {Boolean} true
|
209
205
|
*/
|
210
206
|
addNode(name) {
|
211
|
-
let me
|
212
|
-
nodeName
|
213
|
-
targetNode = me
|
207
|
+
let me = this,
|
208
|
+
nodeName = 'node' + Neo.capitalize(name.replace(Resizable.nameRegEx, (str, letter) => letter.toUpperCase())),
|
209
|
+
{targetNode} = me;
|
214
210
|
|
215
211
|
if (targetNode) {
|
216
212
|
me.currentNodeName = name;
|
@@ -219,10 +215,10 @@ class Resizable extends Base {
|
|
219
215
|
targetNode.cn = targetNode.cn || [];
|
220
216
|
targetNode.cn.push(me[nodeName]);
|
221
217
|
|
222
|
-
return true
|
218
|
+
return true
|
223
219
|
}
|
224
220
|
|
225
|
-
return false
|
221
|
+
return false
|
226
222
|
}
|
227
223
|
|
228
224
|
/**
|
@@ -257,12 +253,12 @@ class Resizable extends Base {
|
|
257
253
|
|
258
254
|
for (; i < len; i++) {
|
259
255
|
if (this.beforeSetEnumValue(value[i], oldValue, 'directions', 'validDirections') !== value[i]) {
|
260
|
-
return oldValue
|
256
|
+
return oldValue
|
261
257
|
}
|
262
258
|
}
|
263
259
|
}
|
264
260
|
|
265
|
-
return value
|
261
|
+
return value
|
266
262
|
}
|
267
263
|
|
268
264
|
/**
|
@@ -289,25 +285,22 @@ class Resizable extends Base {
|
|
289
285
|
me.removeBodyCursorCls();
|
290
286
|
|
291
287
|
me.dragZone.dragEnd();
|
292
|
-
me.removeAllNodes()
|
288
|
+
me.removeAllNodes()
|
293
289
|
}
|
294
290
|
|
295
291
|
/**
|
296
292
|
* @param {Object} data
|
297
293
|
*/
|
298
294
|
onDragMove(data) {
|
299
|
-
let me
|
300
|
-
node
|
301
|
-
ctRect
|
302
|
-
maxHeight = me
|
303
|
-
|
304
|
-
minHeight = me.minHeight,
|
305
|
-
minWidth = me.minWidth,
|
306
|
-
rect = me.initialRect,
|
295
|
+
let me = this,
|
296
|
+
node = me.currentNodeName,
|
297
|
+
ctRect = me.boundaryContainerRect,
|
298
|
+
{maxHeight, maxWidth, minHeight, minWidth} = me,
|
299
|
+
rect = me.initialRect,
|
307
300
|
dist, size, style;
|
308
301
|
|
309
302
|
if (!node) {
|
310
|
-
me.onDragEnd({})
|
303
|
+
me.onDragEnd({})
|
311
304
|
} else if (me.dragZone.dragProxy) {
|
312
305
|
style = me.dragZone.dragProxy.wrapperStyle;
|
313
306
|
|
@@ -322,23 +315,23 @@ class Resizable extends Base {
|
|
322
315
|
size = Math.min(size, ctRect.bottom - rect.top);
|
323
316
|
}
|
324
317
|
|
325
|
-
style.height = `${size}px
|
318
|
+
style.height = `${size}px`
|
326
319
|
} else if (node.includes('top')) {
|
327
320
|
dist = Math.min(rect.bottom - minHeight, data.clientY);
|
328
321
|
size = Math.max(minHeight, rect.height + rect.top - data.clientY);
|
329
322
|
|
330
323
|
if (maxHeight) {
|
331
324
|
dist = Math.max(dist, rect.bottom - maxHeight);
|
332
|
-
size = Math.min(size, maxHeight)
|
325
|
+
size = Math.min(size, maxHeight)
|
333
326
|
}
|
334
327
|
|
335
328
|
if (ctRect) {
|
336
329
|
dist = Math.max(dist, ctRect.top);
|
337
|
-
size = Math.min(size, rect.bottom - ctRect.top)
|
330
|
+
size = Math.min(size, rect.bottom - ctRect.top)
|
338
331
|
}
|
339
332
|
|
340
333
|
style.height = `${size}px`;
|
341
|
-
style.top = `${dist}px
|
334
|
+
style.top = `${dist}px`
|
342
335
|
}
|
343
336
|
|
344
337
|
if (node.includes('left')) {
|
@@ -347,31 +340,31 @@ class Resizable extends Base {
|
|
347
340
|
|
348
341
|
if (maxWidth) {
|
349
342
|
dist = Math.max(dist, rect.right - maxWidth);
|
350
|
-
size = Math.min(size, maxWidth)
|
343
|
+
size = Math.min(size, maxWidth)
|
351
344
|
}
|
352
345
|
|
353
346
|
if (ctRect) {
|
354
347
|
dist = Math.max(dist, ctRect.left);
|
355
|
-
size = Math.min(size, rect.right - ctRect.left)
|
348
|
+
size = Math.min(size, rect.right - ctRect.left)
|
356
349
|
}
|
357
350
|
|
358
351
|
style.left = `${dist}px`;
|
359
|
-
style.width = `${size}px
|
352
|
+
style.width = `${size}px`
|
360
353
|
} else if (node.includes('right')) {
|
361
354
|
size = Math.max(minWidth, rect.width - rect.right + data.clientX);
|
362
355
|
|
363
356
|
if (maxWidth) {
|
364
|
-
size = Math.min(size, maxWidth)
|
357
|
+
size = Math.min(size, maxWidth)
|
365
358
|
}
|
366
359
|
|
367
360
|
if (ctRect) {
|
368
|
-
size = Math.min(size, ctRect.right - rect.left)
|
361
|
+
size = Math.min(size, ctRect.right - rect.left)
|
369
362
|
}
|
370
363
|
|
371
|
-
style.width = `${size}px
|
364
|
+
style.width = `${size}px`
|
372
365
|
}
|
373
366
|
|
374
|
-
me.dragZone.dragProxy.wrapperStyle = style
|
367
|
+
me.dragZone.dragProxy.wrapperStyle = style
|
375
368
|
}
|
376
369
|
}
|
377
370
|
|
@@ -379,13 +372,12 @@ class Resizable extends Base {
|
|
379
372
|
* @param {Object} data
|
380
373
|
*/
|
381
374
|
onDragStart(data) {
|
382
|
-
let me
|
383
|
-
containerId
|
384
|
-
i
|
385
|
-
len
|
386
|
-
owner
|
387
|
-
|
388
|
-
style = owner.wrapperStyle, // todo: delegation target
|
375
|
+
let me = this,
|
376
|
+
containerId = me.boundaryContainerId,
|
377
|
+
i = 0,
|
378
|
+
len = data.path.length,
|
379
|
+
{appName, owner} = me,
|
380
|
+
style = owner.wrapperStyle, // todo: delegation target
|
389
381
|
target;
|
390
382
|
|
391
383
|
me.isDragging = true;
|
@@ -397,21 +389,21 @@ class Resizable extends Base {
|
|
397
389
|
target = data.path[i];
|
398
390
|
|
399
391
|
if (target.cls.includes(me.delegationCls)) {
|
400
|
-
me.initialRect = target.rect
|
392
|
+
me.initialRect = target.rect
|
401
393
|
}
|
402
394
|
|
403
395
|
if (containerId) {
|
404
396
|
if (containerId === 'document.body' && target.tagName === 'body' || containerId === target.id) {
|
405
397
|
me.boundaryContainerRect = target.rect;
|
406
|
-
break
|
398
|
+
break // assuming that the dragEl is not outside of the container
|
407
399
|
}
|
408
400
|
}
|
409
401
|
}
|
410
402
|
|
411
403
|
if (!me.boundaryContainerRect) {
|
412
404
|
owner.getDomRect(me.boundaryContainerRect).then(rect => {
|
413
|
-
me.boundaryContainerRect = rect
|
414
|
-
})
|
405
|
+
me.boundaryContainerRect = rect
|
406
|
+
})
|
415
407
|
}
|
416
408
|
|
417
409
|
me.addBodyCursorCls();
|
@@ -425,12 +417,12 @@ class Resizable extends Base {
|
|
425
417
|
moveInMainThread : false,
|
426
418
|
owner,
|
427
419
|
...me.dragZoneConfig
|
428
|
-
})
|
420
|
+
})
|
429
421
|
} else {
|
430
|
-
me.dragZone.boundaryContainerId = owner.boundaryContainerId
|
422
|
+
me.dragZone.boundaryContainerId = owner.boundaryContainerId
|
431
423
|
}
|
432
424
|
|
433
|
-
me.dragZone.dragStart(data)
|
425
|
+
me.dragZone.dragStart(data)
|
434
426
|
}
|
435
427
|
|
436
428
|
/**
|
@@ -438,39 +430,36 @@ class Resizable extends Base {
|
|
438
430
|
* @param {Object} data
|
439
431
|
*/
|
440
432
|
onMouseDown(data) {
|
441
|
-
this.isDragging = true
|
433
|
+
this.isDragging = true
|
442
434
|
}
|
443
435
|
|
444
436
|
/**
|
445
437
|
* @param {Object} data
|
446
438
|
*/
|
447
439
|
onMouseMove(data) {
|
448
|
-
let me
|
449
|
-
dir
|
450
|
-
i
|
451
|
-
gap
|
452
|
-
h
|
453
|
-
len
|
454
|
-
owner = me.owner,
|
455
|
-
targetNode = me.targetNode,
|
456
|
-
vdom = owner.vdom,
|
440
|
+
let me = this,
|
441
|
+
dir = me.directions,
|
442
|
+
i = 0,
|
443
|
+
{gap, owner, targetNode} = me,
|
444
|
+
h = false,
|
445
|
+
len = data.path.length,
|
457
446
|
bottom, left, right, target, top;
|
458
447
|
|
459
448
|
if (!me.isDragging && !owner.isDragging) {
|
460
449
|
for (; i < len; i++) {
|
461
450
|
if (data.path[i].cls.includes(me.delegationCls)) {
|
462
451
|
target = data.path[i];
|
463
|
-
break
|
452
|
+
break
|
464
453
|
}
|
465
454
|
}
|
466
455
|
|
467
456
|
if (target) {
|
468
457
|
if (target.id !== (targetNode && targetNode.id)) {
|
469
458
|
if (targetNode) {
|
470
|
-
me.removeAllNodes()
|
459
|
+
me.removeAllNodes()
|
471
460
|
}
|
472
461
|
|
473
|
-
me.targetNode = owner.getVdomChild(target.id)
|
462
|
+
me.targetNode = owner.getVdomChild(target.id)
|
474
463
|
}
|
475
464
|
|
476
465
|
bottom = data.clientY >= target.rect.y - gap + target.rect.height;
|
@@ -478,26 +467,26 @@ class Resizable extends Base {
|
|
478
467
|
right = data.clientX >= target.rect.x - gap + target.rect.width;
|
479
468
|
top = data.clientY <= target.rect.y + gap;
|
480
469
|
|
481
|
-
if (me.nodeBottom && (!bottom || bottom && left || bottom && right)) {h = me.removeNode('bottom')
|
482
|
-
if (me.nodeLeft && (!left || bottom && left || top && left)) {h = me.removeNode('left')
|
483
|
-
if (me.nodeRight && (!right || bottom && right || top && right)) {h = me.removeNode('right')
|
484
|
-
if (me.nodeTop && (!top || top && left || top && right)) {h = me.removeNode('top')
|
485
|
-
|
486
|
-
if (me.nodeBottomLeft && (!bottom || !left)) {h = me.removeNode('bottom-left')
|
487
|
-
if (me.nodeBottomRight && (!bottom || !right)) {h = me.removeNode('bottom-right')
|
488
|
-
if (me.nodeTopLeft && (!top || !left)) {h = me.removeNode('top-left')
|
489
|
-
if (me.nodeTopRight && (!top || !right)) {h = me.removeNode('top-right')
|
490
|
-
|
491
|
-
if (dir.includes('bl') && bottom && left) {if (!me.nodeBottomLeft) {h = me.addNode('bottom-left')
|
492
|
-
else if (dir.includes('br') && bottom && right) {if (!me.nodeBottomRight) {h = me.addNode('bottom-right')
|
493
|
-
else if (dir.includes('tl') && top && left) {if (!me.nodeTopLeft) {h = me.addNode('top-left')
|
494
|
-
else if (dir.includes('tr') && top && right) {if (!me.nodeTopRight) {h = me.addNode('top-right')
|
495
|
-
else if (dir.includes('b') && bottom) {if (!me.nodeBottom) {h = me.addNode('bottom')
|
496
|
-
else if (dir.includes('l') && left) {if (!me.nodeLeft) {h = me.addNode('left')
|
497
|
-
else if (dir.includes('r') && right) {if (!me.nodeRight) {h = me.addNode('right')
|
498
|
-
else if (dir.includes('t') && top) {if (!me.nodeTop) {h = me.addNode('top')
|
499
|
-
|
500
|
-
h && owner.update()
|
470
|
+
if (me.nodeBottom && (!bottom || bottom && left || bottom && right)) {h = me.removeNode('bottom')}
|
471
|
+
if (me.nodeLeft && (!left || bottom && left || top && left)) {h = me.removeNode('left')}
|
472
|
+
if (me.nodeRight && (!right || bottom && right || top && right)) {h = me.removeNode('right')}
|
473
|
+
if (me.nodeTop && (!top || top && left || top && right)) {h = me.removeNode('top')}
|
474
|
+
|
475
|
+
if (me.nodeBottomLeft && (!bottom || !left)) {h = me.removeNode('bottom-left')}
|
476
|
+
if (me.nodeBottomRight && (!bottom || !right)) {h = me.removeNode('bottom-right')}
|
477
|
+
if (me.nodeTopLeft && (!top || !left)) {h = me.removeNode('top-left')}
|
478
|
+
if (me.nodeTopRight && (!top || !right)) {h = me.removeNode('top-right')}
|
479
|
+
|
480
|
+
if (dir.includes('bl') && bottom && left) {if (!me.nodeBottomLeft) {h = me.addNode('bottom-left')}}
|
481
|
+
else if (dir.includes('br') && bottom && right) {if (!me.nodeBottomRight) {h = me.addNode('bottom-right')}}
|
482
|
+
else if (dir.includes('tl') && top && left) {if (!me.nodeTopLeft) {h = me.addNode('top-left')}}
|
483
|
+
else if (dir.includes('tr') && top && right) {if (!me.nodeTopRight) {h = me.addNode('top-right')}}
|
484
|
+
else if (dir.includes('b') && bottom) {if (!me.nodeBottom) {h = me.addNode('bottom')}}
|
485
|
+
else if (dir.includes('l') && left) {if (!me.nodeLeft) {h = me.addNode('left')}}
|
486
|
+
else if (dir.includes('r') && right) {if (!me.nodeRight) {h = me.addNode('right')}}
|
487
|
+
else if (dir.includes('t') && top) {if (!me.nodeTop) {h = me.addNode('top')}}
|
488
|
+
|
489
|
+
h && owner.update()
|
501
490
|
}
|
502
491
|
}
|
503
492
|
}
|
@@ -511,7 +500,7 @@ class Resizable extends Base {
|
|
511
500
|
if (!me.isDragging && !me.owner.isDragging) {
|
512
501
|
// limit the event to delegation targets
|
513
502
|
if (data.path[0].cls.includes(me.delegationCls)) {
|
514
|
-
me.removeAllNodes()
|
503
|
+
me.removeAllNodes()
|
515
504
|
}
|
516
505
|
}
|
517
506
|
}
|
@@ -521,7 +510,7 @@ class Resizable extends Base {
|
|
521
510
|
* @param {Object} data
|
522
511
|
*/
|
523
512
|
onMouseUp(data) {
|
524
|
-
this.isDragging = false
|
513
|
+
this.isDragging = false
|
525
514
|
}
|
526
515
|
|
527
516
|
/**
|
@@ -536,7 +525,7 @@ class Resizable extends Base {
|
|
536
525
|
me.owner.update();
|
537
526
|
|
538
527
|
me.currentNodeName = null;
|
539
|
-
me.targetNode = null
|
528
|
+
me.targetNode = null
|
540
529
|
}
|
541
530
|
}
|
542
531
|
|
@@ -544,17 +533,13 @@ class Resizable extends Base {
|
|
544
533
|
*
|
545
534
|
*/
|
546
535
|
removeBodyCursorCls() {
|
547
|
-
Neo.
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
cls: {
|
553
|
-
add : [],
|
554
|
-
remove: [`neo-cursor-${Resizable.cursorPositions[Resizable.positions.indexOf(this.currentNodeName)]}-resize`]
|
555
|
-
}
|
536
|
+
Neo.applyDeltas(this.appName, {
|
537
|
+
id : 'document.body',
|
538
|
+
cls: {
|
539
|
+
add : [],
|
540
|
+
remove: [`neo-cursor-${Resizable.cursorPositions[Resizable.positions.indexOf(this.currentNodeName)]}-resize`]
|
556
541
|
}
|
557
|
-
})
|
542
|
+
})
|
558
543
|
}
|
559
544
|
|
560
545
|
/**
|
@@ -570,10 +555,10 @@ class Resizable extends Base {
|
|
570
555
|
NeoArray.remove(me.targetNode.cn, me[nodeName]);
|
571
556
|
me[nodeName] = null;
|
572
557
|
|
573
|
-
return true
|
558
|
+
return true
|
574
559
|
}
|
575
560
|
|
576
|
-
return false
|
561
|
+
return false
|
577
562
|
}
|
578
563
|
}
|
579
564
|
|
@@ -0,0 +1,175 @@
|
|
1
|
+
import BasePlugin from './Base.mjs';
|
2
|
+
|
3
|
+
/**
|
4
|
+
* @class Neo.plugin.Responsive
|
5
|
+
* @extends Neo.plugin.Base
|
6
|
+
*/
|
7
|
+
class Responsive extends BasePlugin {
|
8
|
+
static config = {
|
9
|
+
/**
|
10
|
+
* @member {String} className='Neo.plugin.Responsive'
|
11
|
+
* @protected
|
12
|
+
*/
|
13
|
+
className: 'Neo.plugin.Responsive',
|
14
|
+
/**
|
15
|
+
* @member {String} ntype='plugin-responsive'
|
16
|
+
* @protected
|
17
|
+
*/
|
18
|
+
ntype: 'plugin-responsive',
|
19
|
+
/**
|
20
|
+
* @member {Map} responsiveConfig: new Map()
|
21
|
+
*/
|
22
|
+
responsiveConfig: new Map(),
|
23
|
+
/**
|
24
|
+
* @member {Object} defaultResponsiveConfig
|
25
|
+
*/
|
26
|
+
defaultResponsiveConfig: {
|
27
|
+
landscape(data) {
|
28
|
+
return data.width > data.height
|
29
|
+
},
|
30
|
+
portrait(data) {
|
31
|
+
return data.width < data.height
|
32
|
+
}
|
33
|
+
}
|
34
|
+
}
|
35
|
+
|
36
|
+
/**
|
37
|
+
* @param {Object} config
|
38
|
+
*/
|
39
|
+
construct(config) {
|
40
|
+
super.construct(config);
|
41
|
+
|
42
|
+
let me = this,
|
43
|
+
{owner} = me;
|
44
|
+
|
45
|
+
owner.addCls('neo-responsive');
|
46
|
+
|
47
|
+
Neo.first('viewport').addDomListeners([
|
48
|
+
{resize: me.onResize, scope: me}
|
49
|
+
])
|
50
|
+
|
51
|
+
Neo.Responsive = Neo.Responsive || {
|
52
|
+
responsiveConfig: new Map(),
|
53
|
+
apps : {}
|
54
|
+
};
|
55
|
+
|
56
|
+
me.addToResponsiveMap(me.defaultResponsiveConfig, me);
|
57
|
+
me.addToResponsiveMap(owner.responsiveConfig || {}, owner);
|
58
|
+
me.handleBodyCls()
|
59
|
+
}
|
60
|
+
|
61
|
+
/**
|
62
|
+
* @param responsiveObj
|
63
|
+
* @param scope
|
64
|
+
*/
|
65
|
+
addToResponsiveMap(responsiveObj, scope) {
|
66
|
+
for (const [key, value] of Object.entries(responsiveObj)) {
|
67
|
+
let fn;
|
68
|
+
|
69
|
+
if (Neo.isObject(value)) {
|
70
|
+
fn = function (rect) {
|
71
|
+
let returnBool = true;
|
72
|
+
|
73
|
+
for (const [subKey, subValue] of Object.entries(value)) {
|
74
|
+
const isMin = subKey.startsWith('min'),
|
75
|
+
testConfig = subKey.substring(3).toLowerCase();
|
76
|
+
|
77
|
+
if (isMin) {
|
78
|
+
returnBool = rect[testConfig] >= subValue
|
79
|
+
} else {
|
80
|
+
returnBool = rect[testConfig] <= subValue
|
81
|
+
}
|
82
|
+
|
83
|
+
if (!returnBool) {
|
84
|
+
break
|
85
|
+
}
|
86
|
+
}
|
87
|
+
|
88
|
+
return returnBool
|
89
|
+
}
|
90
|
+
} else {
|
91
|
+
fn = value
|
92
|
+
}
|
93
|
+
|
94
|
+
fn = fn.bind(scope);
|
95
|
+
|
96
|
+
Neo.Responsive.responsiveConfig.set(key, fn)
|
97
|
+
}
|
98
|
+
}
|
99
|
+
|
100
|
+
/**
|
101
|
+
*
|
102
|
+
*/
|
103
|
+
handleBodyCls() {
|
104
|
+
const
|
105
|
+
me = this,
|
106
|
+
{appName} = me.owner,
|
107
|
+
apps = Neo.Responsive;
|
108
|
+
|
109
|
+
if (!apps[appName]?.activeBodyUpdate) {
|
110
|
+
const viewport = Neo.first('viewport'); // todo
|
111
|
+
|
112
|
+
apps[appName] = {
|
113
|
+
appId : viewport.id,
|
114
|
+
activeBodyUpdate: true
|
115
|
+
};
|
116
|
+
|
117
|
+
viewport.addDomListeners([
|
118
|
+
{resize: me.onResizeBody, scope: me}
|
119
|
+
])
|
120
|
+
}
|
121
|
+
}
|
122
|
+
|
123
|
+
/**
|
124
|
+
* @param {Object} data
|
125
|
+
*/
|
126
|
+
onResize(data) {
|
127
|
+
const
|
128
|
+
me = this,
|
129
|
+
config = {},
|
130
|
+
configTester = Neo.Responsive.responsiveConfig,
|
131
|
+
{owner} = me,
|
132
|
+
{responsive} = owner;
|
133
|
+
|
134
|
+
for (const [key, value] of Object.entries(responsive)) {
|
135
|
+
const hasKey = configTester.get(key)?.(data.rect);
|
136
|
+
|
137
|
+
if (hasKey) {
|
138
|
+
for (const [configKey, configValue] of Object.entries(value)) {
|
139
|
+
if (false && Neo.typeOf(owner[configKey]) === 'NeoInstance') {
|
140
|
+
// todo: ntype, module or className must match
|
141
|
+
owner[configKey].set(value)
|
142
|
+
} else {
|
143
|
+
config[configKey] = configValue
|
144
|
+
}
|
145
|
+
}
|
146
|
+
}
|
147
|
+
}
|
148
|
+
|
149
|
+
Object.keys(config).length > 0 && owner.set(config)
|
150
|
+
}
|
151
|
+
|
152
|
+
/**
|
153
|
+
* Add either neo-landscape or neo-portrait to the parent viewport component
|
154
|
+
*/
|
155
|
+
onResizeBody(data) {
|
156
|
+
const
|
157
|
+
me = this,
|
158
|
+
newRect = data.contentRect,
|
159
|
+
isLandscape = newRect.width >= newRect.height,
|
160
|
+
addCls = isLandscape ? 'neo-landscape' : 'neo-portrait',
|
161
|
+
removeCls = isLandscape ? 'neo-portrait' : 'neo-landscape';
|
162
|
+
|
163
|
+
Neo.applyDeltas(me.appName, {
|
164
|
+
id : 'document.body',
|
165
|
+
cls: {
|
166
|
+
add : [addCls],
|
167
|
+
remove: [removeCls]
|
168
|
+
}
|
169
|
+
})
|
170
|
+
}
|
171
|
+
}
|
172
|
+
|
173
|
+
Neo.setupClass(Responsive);
|
174
|
+
|
175
|
+
export default Responsive;
|
package/src/remotes/Api.mjs
CHANGED
@@ -39,8 +39,8 @@ class Api extends Base {
|
|
39
39
|
*
|
40
40
|
*/
|
41
41
|
load() {
|
42
|
-
let config = Neo
|
43
|
-
path
|
42
|
+
let {config} = Neo,
|
43
|
+
path = config.remotesApiUrl;
|
44
44
|
|
45
45
|
// relative paths need a special treatment
|
46
46
|
if (!path.includes('http')) {
|
@@ -67,12 +67,10 @@ class Api extends Base {
|
|
67
67
|
ns = Neo.ns(`${api.namespace}.${service}`, true);
|
68
68
|
|
69
69
|
Object.entries(serviceValue.methods).forEach(([method, methodValue]) => {
|
70
|
-
ns[method] = this.generateRemote(service, method)
|
70
|
+
ns[method] = this.generateRemote(service, method)
|
71
71
|
})
|
72
72
|
})
|
73
73
|
}
|
74
74
|
}
|
75
75
|
|
76
|
-
|
77
|
-
|
78
|
-
export default instance;
|
76
|
+
export default Neo.setupClass(Api);
|
@@ -22,14 +22,14 @@ class CircleModel extends Model {
|
|
22
22
|
* @param {Object} data
|
23
23
|
*/
|
24
24
|
onKeyDownLeft(data) {
|
25
|
-
this.onNavKey(data, -1)
|
25
|
+
this.onNavKey(data, -1)
|
26
26
|
}
|
27
27
|
|
28
28
|
/**
|
29
29
|
* @param {Object} data
|
30
30
|
*/
|
31
31
|
onKeyDownRight(data) {
|
32
|
-
this.onNavKey(data, 1)
|
32
|
+
this.onNavKey(data, 1)
|
33
33
|
}
|
34
34
|
|
35
35
|
/**
|
@@ -39,8 +39,8 @@ class CircleModel extends Model {
|
|
39
39
|
onNavKey(data, step) {
|
40
40
|
let me = this,
|
41
41
|
item = data.path[0],
|
42
|
-
view
|
43
|
-
store
|
42
|
+
{view} = me,
|
43
|
+
{store} = view,
|
44
44
|
maxIndex = Math.min(store.getCount(), view.maxItems) - 1,
|
45
45
|
index, itemId, recordId;
|
46
46
|
|
@@ -48,16 +48,16 @@ class CircleModel extends Model {
|
|
48
48
|
recordId = parseInt(view.getItemRecordId(item.id));
|
49
49
|
index = store.indexOf(recordId) + step;
|
50
50
|
|
51
|
-
if (index < 0) {index = maxIndex
|
52
|
-
else if (index > maxIndex) {index = 0
|
51
|
+
if (index < 0) {index = maxIndex}
|
52
|
+
else if (index > maxIndex) {index = 0}
|
53
53
|
} else {
|
54
|
-
index = 0
|
54
|
+
index = 0
|
55
55
|
}
|
56
56
|
|
57
57
|
itemId = view.getItemId(index);
|
58
58
|
|
59
59
|
me.select(itemId);
|
60
|
-
view.focus(itemId)
|
60
|
+
view.focus(itemId)
|
61
61
|
}
|
62
62
|
|
63
63
|
/**
|
@@ -66,25 +66,21 @@ class CircleModel extends Model {
|
|
66
66
|
register(component) {
|
67
67
|
super.register(component);
|
68
68
|
|
69
|
-
let
|
70
|
-
id = me.id,
|
71
|
-
view = me.view;
|
69
|
+
let {id, view} = this;
|
72
70
|
|
73
71
|
view.keys?._keys.push(
|
74
72
|
{fn: 'onKeyDownLeft' ,key: 'Down' ,scope: id},
|
75
73
|
{fn: 'onKeyDownLeft' ,key: 'Left' ,scope: id},
|
76
74
|
{fn: 'onKeyDownRight' ,key: 'Right' ,scope: id},
|
77
75
|
{fn: 'onKeyDownRight' ,key: 'Up' ,scope: id}
|
78
|
-
)
|
76
|
+
)
|
79
77
|
}
|
80
78
|
|
81
79
|
/**
|
82
80
|
*
|
83
81
|
*/
|
84
82
|
unregister() {
|
85
|
-
let
|
86
|
-
id = me.id,
|
87
|
-
view = me.view;
|
83
|
+
let {id, view} = this;
|
88
84
|
|
89
85
|
view.keys?.removeKeys([
|
90
86
|
{fn: 'onKeyDownLeft' ,key: 'Down' ,scope: id},
|
@@ -93,7 +89,7 @@ class CircleModel extends Model {
|
|
93
89
|
{fn: 'onKeyDownRight' ,key: 'Up' ,scope: id}
|
94
90
|
]);
|
95
91
|
|
96
|
-
super.unregister()
|
92
|
+
super.unregister()
|
97
93
|
}
|
98
94
|
}
|
99
95
|
|