rsence-pre 3.0.0.0 → 3.0.0.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 15c35ff7feb4abe831f8b8ceefd7c1e758e2e5ec
|
4
|
+
data.tar.gz: c473028fd6ebac368aa66911c1cade5e32efb57c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9e9f754d1a97046fadc0b71fc1b76970adbbb102c28ed38818e947098e3d740a254d904be5178ebe9f76c846f04aca87a28aa8e628293ffa028880f3ef990163
|
7
|
+
data.tar.gz: bb87cf8fb7a624ebdf7a5efde5c4fdf26febe5d0059ded0534296ed578347598e10b3d438bd1527c7b397e9fc9ea9412963f064e39f3158590f073a37b95b805
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.0.0.
|
1
|
+
3.0.0.1.pre
|
@@ -742,15 +742,11 @@ HEventResponder = HClass.extend({
|
|
742
742
|
**/
|
743
743
|
textEnter: function() {},
|
744
744
|
|
745
|
-
/** Selection handling
|
745
|
+
/** Selection handling. Preferably extend #select and #deSelect.
|
746
746
|
**/
|
747
747
|
selected: false,
|
748
|
-
select: function(){
|
749
|
-
|
750
|
-
},
|
751
|
-
deSelect: function(){
|
752
|
-
// console.warn("HControl#deSelect not supported yet.");
|
753
|
-
},
|
748
|
+
select: function(){},
|
749
|
+
deSelect: function(){},
|
754
750
|
setSelected: function(_state){
|
755
751
|
this.toggleCSSClass(this.elemId, HControl.CSS_SELECTED, _state);
|
756
752
|
if( _state ){
|
@@ -261,6 +261,7 @@ EventManagerApp = HApplication.extend
|
|
261
261
|
droppable: [] # viewIds
|
262
262
|
rectHover: [] # viewIds
|
263
263
|
multiDrop: [] # viewIds
|
264
|
+
keyRepeat: [] # viewIds
|
264
265
|
keyDown: [] # viewIds
|
265
266
|
keyUp: [] # viewIds
|
266
267
|
mouseWheel: [] # viewIds
|
@@ -350,12 +351,24 @@ EventManagerApp = HApplication.extend
|
|
350
351
|
_value = _eventOptions[_key]
|
351
352
|
if _value
|
352
353
|
_eventsOn.push( _key )
|
353
|
-
|
354
|
-
|
354
|
+
if _key == 'keyDown'
|
355
|
+
if _value == 'repeat'
|
356
|
+
unless ~@_listeners.byEvent['keyRepeat'].indexOf(_viewId)
|
357
|
+
@_listeners.byEvent['keyRepeat'].unshift( _viewId )
|
358
|
+
else
|
359
|
+
_idx = @_listeners.byEvent['keyRepeat'].indexOf(_viewId)
|
360
|
+
@_listeners.byEvent['keyRepeat'].splice( _idx, 1 ) if ~_idx
|
361
|
+
unless ~@_listeners.byEvent[_key].indexOf(_viewId)
|
362
|
+
@_listeners.byEvent[_key].unshift( _viewId )
|
363
|
+
if _key == 'rectHover' and _value == 'intersects' and
|
364
|
+
not ~@_listeners._rectHoverIntersectMode.indexOf( _viewId )
|
355
365
|
@_listeners._rectHoverIntersectMode.unshift( _viewId )
|
356
|
-
else
|
357
|
-
|
358
|
-
|
366
|
+
else # not _value
|
367
|
+
_keys = [_key]
|
368
|
+
_keys.push('keyRepeat') if _key == 'keyDown'
|
369
|
+
for _key in _keys
|
370
|
+
_idx = @_listeners.byEvent[_key].indexOf(_viewId)
|
371
|
+
@_listeners.byEvent[_key].splice( _idx, 1 ) if ~_idx
|
359
372
|
else
|
360
373
|
@warn( "EventManager##{_warnMethodName} => Invalid event type: #{_key}" )
|
361
374
|
_this = @
|
@@ -445,12 +458,12 @@ EventManagerApp = HApplication.extend
|
|
445
458
|
# both before and after in all circumstances, but better be safe than sure.
|
446
459
|
resize: (e)->
|
447
460
|
HSystem._updateFlexibleRects()
|
461
|
+
ELEM.flush()
|
448
462
|
for _viewId in @_listeners.byEvent.resize
|
449
463
|
_ctrl = @_views[_viewId]
|
450
464
|
_ctrl.resize() if _ctrl.resize?
|
451
|
-
|
452
|
-
|
453
|
-
, 100 )
|
465
|
+
ELEM.flush()
|
466
|
+
HSystem._updateFlexibleRects()
|
454
467
|
#
|
455
468
|
# Finds the next elem with a view_id attribute
|
456
469
|
_findViewId: (_elem)->
|
@@ -561,9 +574,7 @@ EventManagerApp = HApplication.extend
|
|
561
574
|
# mouse has been moved (replacement of mouseover/mouseout)
|
562
575
|
_findNewFocus: (x,y)->
|
563
576
|
_dragged = @_listeners.dragged
|
564
|
-
if _dragged.length != 0
|
565
|
-
console.log('dragged:',_dragged)
|
566
|
-
return
|
577
|
+
# return if _dragged.length != 0
|
567
578
|
_matchIds = @_findTopmostEnabled( HPoint.new( x, y ), 'contains', null )
|
568
579
|
_focused = @_listeners.focused
|
569
580
|
if _matchIds.length == 0
|
@@ -572,10 +583,10 @@ EventManagerApp = HApplication.extend
|
|
572
583
|
for _viewId in _matchIds
|
573
584
|
continue if ~_focused.indexOf(_viewId)
|
574
585
|
_ctrl = @_views[_viewId]
|
575
|
-
@_debugHighlight(_ctrl)
|
576
586
|
for _focusId in _focused
|
577
587
|
@blur( @_views[_focusId] )
|
578
588
|
_focused.splice( _focused.indexOf(_focusId), 1 )
|
589
|
+
# @_debugHighlight(_ctrl)
|
579
590
|
@focus( _ctrl )
|
580
591
|
#
|
581
592
|
# Just split to gain namespace:
|
@@ -665,20 +676,23 @@ EventManagerApp = HApplication.extend
|
|
665
676
|
_area.x-_parent.pageX()-_subX,
|
666
677
|
_area.y-_parent.pageY()-_subY
|
667
678
|
)
|
668
|
-
else
|
679
|
+
else if _view.parent.hasAncestor( HApplication )
|
669
680
|
_searchArea = _area
|
681
|
+
else
|
682
|
+
console.warn('invalid view parent:',_view.parent)
|
683
|
+
continue
|
670
684
|
if _view.hasAncestor? and _view.hasAncestor( HView )
|
671
685
|
if _view.rect[_matchMethod](_searchArea) and !_view.isHidden
|
672
686
|
if ~_arrOfIds.indexOf( _viewId )
|
673
687
|
_foundId = _search( _view.viewsZOrder.slice().reverse() )
|
674
|
-
return _foundId
|
688
|
+
return _foundId unless _foundId == false
|
675
689
|
return _viewId
|
676
690
|
else
|
677
691
|
_result = _search( _view.viewsZOrder.slice().reverse() )
|
678
|
-
return _result
|
692
|
+
return _result unless _result == false
|
679
693
|
return false
|
680
694
|
_foundId = _search( HSystem.viewsZOrder.slice().reverse() )
|
681
|
-
return [ _foundId ]
|
695
|
+
return [ _foundId ] unless _foundId == false
|
682
696
|
return []
|
683
697
|
#
|
684
698
|
# Finds the topmost drop/hover target within the area specified by rectHover
|
@@ -868,7 +882,8 @@ EventManagerApp = HApplication.extend
|
|
868
882
|
@status.setButton1( false )
|
869
883
|
else
|
870
884
|
# there is a separate event for context menu, and only
|
871
|
-
# Firefox fires click separately
|
885
|
+
# Firefox fires click separately.
|
886
|
+
# the handler is contextMenu
|
872
887
|
return true
|
873
888
|
#
|
874
889
|
# Focus check here
|
@@ -964,7 +979,7 @@ EventManagerApp = HApplication.extend
|
|
964
979
|
@_modifiers(e)
|
965
980
|
_stop = true
|
966
981
|
@status.setButton1( false )
|
967
|
-
@status.setButton2(
|
982
|
+
@status.setButton2( true )
|
968
983
|
_focused = @_listeners.focused
|
969
984
|
_contextMenuable = @_listeners.byEvent.contextMenu
|
970
985
|
for _viewId in _focused
|
@@ -1054,12 +1069,14 @@ EventManagerApp = HApplication.extend
|
|
1054
1069
|
_stop = true
|
1055
1070
|
_active = @_listeners.active
|
1056
1071
|
_keyDowners = @_listeners.byEvent.keyDown
|
1072
|
+
_keyRepeaters = @_listeners.byEvent.keyRepeat
|
1057
1073
|
_keyDowns = []
|
1058
|
-
|
1059
|
-
|
1060
|
-
|
1074
|
+
_repeating = ( @_lastKeyDown == _keyCode ) and @status.hasKeyDown( _keyCode )
|
1075
|
+
# unless @status.hasKeyDown( _keyCode )
|
1076
|
+
for _viewId in _keyDowners
|
1077
|
+
if !_repeating or ~_keyRepeaters.indexOf( _viewId )
|
1078
|
+
_keyDowns.push( _viewId ) if ~_active.indexOf( _viewId )
|
1061
1079
|
@status.addKeyDown( _keyCode )
|
1062
|
-
# repeat not implemented yet
|
1063
1080
|
for _viewId in _keyDowns
|
1064
1081
|
_ctrl = @_views[_viewId]
|
1065
1082
|
if _ctrl.keyDown?
|
@@ -1091,11 +1108,11 @@ EventManagerApp = HApplication.extend
|
|
1091
1108
|
@status.delKeyDown( _keyCode )
|
1092
1109
|
for _viewId in _keyUppers
|
1093
1110
|
_ctrl = @_views[_viewId]
|
1094
|
-
if _ctrl.keyUp?
|
1111
|
+
if _ctrl.keyUp? and ~_active.indexOf( _viewId )
|
1095
1112
|
_stop = true if _ctrl.keyUp( _keyCode )
|
1096
1113
|
Event.stop(e) if _stop
|
1097
1114
|
keyPress: (e)->
|
1098
|
-
@warn('EventManager#keyPress not implemented')
|
1115
|
+
# @warn('EventManager#keyPress not implemented')
|
1099
1116
|
isKeyDown: (_keyCode)->
|
1100
1117
|
@warn('EventManager#isKeyDown() is deprecated, use #status.hasKeyDown() instead')
|
1101
1118
|
@status.hasKeyDown( _keyCode )
|