rsence-pre 3.0.0.1 → 3.0.0.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 15c35ff7feb4abe831f8b8ceefd7c1e758e2e5ec
4
- data.tar.gz: c473028fd6ebac368aa66911c1cade5e32efb57c
3
+ metadata.gz: c4e74c9e882c2797dc628b24a8de10c19e1b30d2
4
+ data.tar.gz: e47ed8ec8c75dc9dd9b09566860fb2fb37385c9f
5
5
  SHA512:
6
- metadata.gz: 9e9f754d1a97046fadc0b71fc1b76970adbbb102c28ed38818e947098e3d740a254d904be5178ebe9f76c846f04aca87a28aa8e628293ffa028880f3ef990163
7
- data.tar.gz: bb87cf8fb7a624ebdf7a5efde5c4fdf26febe5d0059ded0534296ed578347598e10b3d438bd1527c7b397e9fc9ea9412963f064e39f3158590f073a37b95b805
6
+ metadata.gz: 20f755cbe04d3089f78ea990379d97f001384394ca9bc08bb4ae020ee4962e6814dc2084dc4c2da1e2687539757f9f6c20426bab025b52ca4dbefceca7f9a2eb
7
+ data.tar.gz: 87876c4252149c573c2f9dd228d239f6800ec50df564e83ad21a58f7b7b70267b31765173b930419ba9959b6f3934fd89ebb22d5ff57c4b1ab7e627f13f5c4ad
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.0.0.1.pre
1
+ 3.0.0.2.pre
@@ -308,7 +308,7 @@ HControl = HView.extend({
308
308
  **/
309
309
  refreshValue: function(){
310
310
  if(this.markupElemIds){
311
- if(this.markupElemIds['value']){
311
+ if(this.markupElemIds.value){
312
312
  ELEM.setHTML(this.markupElemIds.value,this.value);
313
313
  }
314
314
  }
@@ -462,8 +462,10 @@ EventManagerApp = HApplication.extend
462
462
  for _viewId in @_listeners.byEvent.resize
463
463
  _ctrl = @_views[_viewId]
464
464
  _ctrl.resize() if _ctrl.resize?
465
- ELEM.flush()
466
- HSystem._updateFlexibleRects()
465
+ setTimeout(->
466
+ ELEM.flush()
467
+ HSystem._updateFlexibleRects()
468
+ , 100 )
467
469
  #
468
470
  # Finds the next elem with a view_id attribute
469
471
  _findViewId: (_elem)->
@@ -577,16 +579,21 @@ EventManagerApp = HApplication.extend
577
579
  # return if _dragged.length != 0
578
580
  _matchIds = @_findTopmostEnabled( HPoint.new( x, y ), 'contains', null )
579
581
  _focused = @_listeners.focused
580
- if _matchIds.length == 0
582
+ if _matchIds.length == 0 # blur all previously focused
581
583
  for _focusId in _focused
582
- @blur( @_views[_focusId] )
584
+ _ctrl = @_views[_focusId]
585
+ if _ctrl?
586
+ @blur( _ctrl )
587
+ _focused.splice( _focused.indexOf(_focusId), 1 )
583
588
  for _viewId in _matchIds
584
589
  continue if ~_focused.indexOf(_viewId)
585
590
  _ctrl = @_views[_viewId]
586
591
  for _focusId in _focused
587
- @blur( @_views[_focusId] )
592
+ _focusCtrl = @_views[_focusId]
593
+ if _focusCtrl?
594
+ @blur( _focusCtrl )
588
595
  _focused.splice( _focused.indexOf(_focusId), 1 )
589
- # @_debugHighlight(_ctrl)
596
+ @_debugHighlight(_ctrl)
590
597
  @focus( _ctrl )
591
598
  #
592
599
  # Just split to gain namespace:
@@ -743,7 +750,7 @@ EventManagerApp = HApplication.extend
743
750
  [ x, y ] = @status.crsr
744
751
  _ctrl.endDrag( x, y )
745
752
  _active.splice( _idx, 1 )
746
- @blur(_ctrl) if ~_focused.indexOf(_viewId)
753
+ @blur(_ctrl) if ~_focused.indexOf(_viewId) and _ctrl?
747
754
  _ctrl.lostActiveStatus(_newActive)
748
755
  _prevActive
749
756
  #
@@ -2013,7 +2013,7 @@ HView = UtilMethods.extend({
2013
2013
  **/
2014
2014
  refreshLabel: function(){
2015
2015
  if(this.markupElemIds){
2016
- if(this.markupElemIds['label']){
2016
+ if(this.markupElemIds.label){
2017
2017
  ELEM.setHTML(this.markupElemIds.label,this.label);
2018
2018
  }
2019
2019
  }
@@ -26,15 +26,9 @@ HMiniMenu = HRadioButtonList.extend({
26
26
  x = this.pageX(),
27
27
  y = this.pageY(),
28
28
  w = this.rect.width,
29
- _listItems = this.listItems ? (this.listItems.length ? this.listItems : [] ) : [],
29
+ _listItems = this.listItems ? (this.listItems.length ? this.listItems : {length:0} ) : {length:0},
30
30
  h = _listItems.length*this.subComponentHeight,
31
- i = 0,
32
- listItem = null;
33
- for(;i<_listItems.length && listItem === null;i++){
34
- if(_listItems[i][0]===this.value){
35
- listItem = _listItems[i];
36
- }
37
- }
31
+ i = 0;
38
32
  y -= (i-1)*this.subComponentHeight;
39
33
  if(y < 0){
40
34
  y = this.subComponentHeight%y;
@@ -57,7 +51,7 @@ HMiniMenu = HRadioButtonList.extend({
57
51
  this.menuItemView.refresh();
58
52
  this.menuItemView.hide();
59
53
  },
60
-
54
+
61
55
  click: function(){
62
56
  if(!this.active){return false;}
63
57
  if( ELEM.getStyle(this.menuItemView.elemId,'visibility',true) === 'hidden' ) {
@@ -82,8 +76,10 @@ HMiniMenu = HRadioButtonList.extend({
82
76
 
83
77
  menuShow: function(){
84
78
  this.repositionMenuItems();
85
- var m = this._menuItemViewShowPos, x=m[0], y=m[1];
86
- this.menuItemView.offsetTo( x, y );
79
+ if( this._menuItemViewShowPos ){
80
+ var m = this._menuItemViewShowPos, x=m[0], y=m[1];
81
+ this.menuItemView.offsetTo( x, y );
82
+ }
87
83
  this.menuItemView.bringToFront();
88
84
  this.menuItemView.show();
89
85
  return true;
@@ -91,8 +87,10 @@ HMiniMenu = HRadioButtonList.extend({
91
87
 
92
88
  menuHide: function(){
93
89
  if( this.menuItemView ){
94
- var m = this._menuItemViewHidePos, x=m[0], y=m[1];
95
- this.menuItemView.offsetTo( x, y );
90
+ if( this._menuItemViewHidePos ){
91
+ var m = this._menuItemViewHidePos, x=m[0], y=m[1];
92
+ this.menuItemView.offsetTo( x, y );
93
+ }
96
94
  this.menuItemView.sendToBack();
97
95
  this.menuItemView.hide();
98
96
  }
@@ -139,7 +137,9 @@ HMiniMenu = HRadioButtonList.extend({
139
137
  _menuItemView.die();
140
138
  }
141
139
  },
142
-
140
+ menuItemViewRect: function(){
141
+ return [ 0-this.rect.width, 0-this.rect.height, this.rect.width, 10 ];
142
+ },
143
143
  drawSubviews: function(){
144
144
  var
145
145
  itemStyle = {
@@ -154,7 +154,7 @@ HMiniMenu = HRadioButtonList.extend({
154
154
  }
155
155
  this.menuItemView = HView.nu(
156
156
  // [ this.rect.left, this.rect.top, this.rect.width, 10 ],
157
- [ 0-this.rect.width, 0-this.rect.height, this.rect.width, 10 ],
157
+ this.menuItemViewRect(),
158
158
  this.app, {
159
159
  visible: false,
160
160
  style: itemStyle,
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: 3.0.0.1
4
+ version: 3.0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Riassence Inc.