From 7cb1bd7c4b51d1d25200abade5b7315c04812235 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Tue, 25 Apr 2017 16:48:58 +0300 Subject: [PATCH] experementing... Signed-off-by: Alex A. Naanou --- ui (gen4)/features/location.js | 21 +++++++++++++++++++++ ui (gen4)/features/ui.js | 7 ++++++- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/ui (gen4)/features/location.js b/ui (gen4)/features/location.js index 2616b716..11db7171 100755 --- a/ui (gen4)/features/location.js +++ b/ui (gen4)/features/location.js @@ -226,6 +226,27 @@ var LocationActions = actions.Actions({ }) return res }], + // XXX how do we call the dispatched actions and all the matching + // pattern actions??? + // One way to go would be: + // .dispatch('location:*:save', ..) + // -> 'location:?' - get the default for '*' + // -> 'location:*:save' (pre) + // -> 'location:file:save' - forms the return value + // -> 'location:*:save' (post) + // + // ...this should the same as calling (???): + // .loadLocation(..) + // XXX sanity check: how is this different for what Action(..) does??? + // ...the only thing this adds is a way not to call some of the + // overloading actions via a simple pattern matching mechanism... + // Example: + // .dispatch('location:file:save', ..) + // -> calls only the "save" actions that match the + // location:file protocol ignoring all other + // implementations... + // ...for pure actions this is also possible by manually checking + // some condition and doing nothing if not matched... dispatch: ['- File/', core.doc` diff --git a/ui (gen4)/features/ui.js b/ui (gen4)/features/ui.js index c4fb0094..647a73c3 100755 --- a/ui (gen4)/features/ui.js +++ b/ui (gen4)/features/ui.js @@ -2388,6 +2388,8 @@ var ControlActions = actions.Actions({ } })], + // Ribbon/viewer wheel... + // // XXX need: // - prevent ribbon from scrolling off screen... // - handle acceleration -- stop and update just before scrolling off the edge... @@ -2396,9 +2398,11 @@ var ControlActions = actions.Actions({ // ...this will prevent losing control of the ribbon when it goes out // from under the cursor... // ...detect via cursor within the vertical band of the ribbon... + // XXX BUG?: acceleration seems to be increasing with time... + // XXX add a "ribbonWheeling" ( ;) ) event a-la ribbonPanning... toggleMouseWheelHandling: ['Interface/Mouse wheel handling', toggler.Toggler(null, - function(){ + function(){ return this.ribbons && this.ribbons.viewer && this.ribbons.viewer.hasClass('mouse-wheel-scroll') ? @@ -2497,6 +2501,7 @@ var ControlActions = actions.Actions({ togglePinchHandling: ['Interface/Pinch zoom handling', function(){ + // XXX }],