rsence-pre 2.3.0.23 → 2.3.0.24
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/js/foundation/eventmanager/eventmanager.coffee +37 -11
- data/lib/rsence/plugins/plugin.rb +1 -1
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.3.0.
|
1
|
+
2.3.0.24.pre
|
@@ -415,6 +415,10 @@ EventManagerApp = HApplication.extend
|
|
415
415
|
@_listeners.enabled.unshift( _viewId ) unless ~@_listeners.enabled.indexOf(_viewId)
|
416
416
|
_elem = ELEM.get( _ctrl.elemId )
|
417
417
|
@observe( _elem, 'mouseover', '_mouseOver' )
|
418
|
+
[ x, y ] = @status.crsr
|
419
|
+
_matchIds = @_findTopmostEnabled( HPoint.new( x, y ), 'contains', null )
|
420
|
+
if ~_matchIds.indexOf( _viewId )
|
421
|
+
@focus( _ctrl )
|
418
422
|
#
|
419
423
|
# Releases bindings done by #_setEventOptions
|
420
424
|
_unsetEventOptions: (_ctrl,_warnMethodName)->
|
@@ -650,35 +654,54 @@ EventManagerApp = HApplication.extend
|
|
650
654
|
@_views[_viewId].hover(_ctrl)
|
651
655
|
@_listeners.hovered = _hoverItems
|
652
656
|
#
|
653
|
-
# Finds the topmost
|
654
|
-
|
657
|
+
# Finds the topmost item from array of viewId's
|
658
|
+
_findTopmostOf: (_arrOfIds, _area, _matchMethod, _selfId )->
|
655
659
|
_views = @_views
|
656
|
-
_droppable = @_listeners.byEvent.droppable
|
657
660
|
_search = (_parentIds)->
|
658
661
|
for _viewId in _parentIds
|
659
662
|
continue if _viewId == _selfId
|
660
663
|
_view = _views[_viewId]
|
661
664
|
if _view.parent.hasAncestor( HView )
|
662
|
-
|
663
|
-
|
665
|
+
_parent = _view.parent
|
666
|
+
if _parent.markupElemIds? and _parent.markupElemIds.subview?
|
667
|
+
_subviewId = _parent.markupElemIds.subview
|
668
|
+
[ _subX, _subY ] = ELEM.getPosition( _subviewId )
|
664
669
|
else
|
665
|
-
|
670
|
+
[ _subX, _subY ] = [ 0, 0 ]
|
671
|
+
if _area.offsetTo? # is a rectangle
|
672
|
+
_searchArea = HRect.new(_area).offsetTo(
|
673
|
+
_area.left-_parent.pageX()-_subX,
|
674
|
+
_area.top-_parent.pageY()-_subY
|
675
|
+
)
|
676
|
+
else # is a point
|
677
|
+
_searchArea = HPoint.new(
|
678
|
+
_area.x-_parent.pageX()-_subX,
|
679
|
+
_area.y-_parent.pageY()-_subY
|
680
|
+
)
|
666
681
|
else
|
667
682
|
_searchArea = _area
|
668
683
|
if _view.hasAncestor? and _view.hasAncestor( HView )
|
669
684
|
if _view.rect[_matchMethod](_searchArea)
|
670
|
-
if ~
|
671
|
-
|
672
|
-
return
|
685
|
+
if ~_arrOfIds.indexOf( _viewId )
|
686
|
+
_foundId = _search( _view.viewsZOrder.slice().reverse() )
|
687
|
+
return _foundId if _foundId
|
673
688
|
return _viewId
|
674
689
|
else
|
675
690
|
_result = _search( _view.viewsZOrder.slice().reverse() )
|
676
691
|
return _result if _result
|
677
692
|
return false
|
678
|
-
|
679
|
-
return [
|
693
|
+
_foundId = _search( HSystem.viewsZOrder.slice().reverse() )
|
694
|
+
return [ _foundId ] if _foundId
|
680
695
|
return []
|
681
696
|
#
|
697
|
+
# Finds the topmost drop/hover target within the area specified by rectHover
|
698
|
+
_findTopmostDroppable: (_area,_matchMethod,_selfId)->
|
699
|
+
return @_findTopmostOf( @_listeners.byEvent.droppable, _area, _matchMethod, _selfId )
|
700
|
+
#
|
701
|
+
# Finds the topmost enabled target within the area specified by area
|
702
|
+
_findTopmostEnabled: (_area,_matchMethod,_selfId)->
|
703
|
+
return @_findTopmostOf( @_listeners.enabled, _area, _matchMethod, _selfId )
|
704
|
+
#
|
682
705
|
# Finds all drop/hover targets within the area specified by rectHover
|
683
706
|
_findAllDroppable: (_area,_matchMethod,_selfId)->
|
684
707
|
_views = @_views
|
@@ -870,6 +893,9 @@ EventManagerApp = HApplication.extend
|
|
870
893
|
# there is a separate event for context menu, and only
|
871
894
|
# Firefox fires click separately
|
872
895
|
return true
|
896
|
+
#
|
897
|
+
# Focus check here
|
898
|
+
#
|
873
899
|
_focused = @_listeners.focused
|
874
900
|
_active = @_listeners.active
|
875
901
|
_clickable = @_listeners.byEvent.click
|
@@ -287,7 +287,7 @@ module RSence
|
|
287
287
|
ses[:deps] = []
|
288
288
|
end
|
289
289
|
( found, path ) = guess_js_path( js_name )
|
290
|
-
return false
|
290
|
+
return false if found == :none
|
291
291
|
unless ses[:deps].include?( path )
|
292
292
|
ses[:deps].push( path )
|
293
293
|
return read_js( path )
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rsence-pre
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.3.0.
|
4
|
+
version: 2.3.0.24
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-04-
|
13
|
+
date: 2013-04-22 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rsence-deps
|