rsence-pre 3.0.0.3 → 3.0.0.4

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: 0d5815813e6446789184142c879d2221cc257b32
4
- data.tar.gz: 65c160a4a11eed947c52cd188a8cab225d45e43b
3
+ metadata.gz: 6df666ef3e2d735857512b63aa2fc04d1ada8850
4
+ data.tar.gz: fd3ad1a68cad0ba219855d2103cb9befc7a5850b
5
5
  SHA512:
6
- metadata.gz: d2f9f5b6a7e55bb928b15aa757255ed6d0703e20607072101064b4ea1a0fb49df0c41920e32fd6c465e58f3f5eec7d09292e142d738af192e7d85bad1ee0ad0d
7
- data.tar.gz: 379816290d414e03d88d65b996666ef0f277a7edd9c7104e5802311231378de474d7939efc1144217d082fb0d16cfcecff3392e87988fbd8f3a6294c3c41bb79
6
+ metadata.gz: cf4190abefe05afc159985db95ab32cfdc23c4a259c961ecf1041beb3b4354042f828d60678673d5d0469f19f1891a9ff7d41ad1a903e72632bf15bc341aadef
7
+ data.tar.gz: 91d70e5aeafe34cc3e9c9678e912241a689fc38c05527c6ff7125d0a1d85e75e72bfe36fa91587c5c7f95731df12e83ba210ad6ef3436df89d37983c665228ea
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.0.0.3.pre
1
+ 3.0.0.4.pre
@@ -232,9 +232,11 @@ HTab = HControl.extend({
232
232
  *
233
233
  **/
234
234
  removeTab: function(_tabIdx){
235
- var _selIdx = this.selectIdx,
236
- _tabViewId = this.tabs[_tabIdx],
237
- _tabLabelElemId = this.tabViews[_tabIdx];
235
+ var
236
+ _selIdx = this.selectIdx,
237
+ _tabViewId = this.tabs[_tabIdx],
238
+ _tabLabelElemId = this.tabLabels[_tabIdx],
239
+ _tabLabelWidth, i = 0;
238
240
  this.tabs.splice(_tabIdx,1);
239
241
  this.tabLabels.splice(_tabIdx,1);
240
242
  this.tabLabelBounds.splice(_tabIdx,1);
@@ -256,6 +258,21 @@ HTab = HControl.extend({
256
258
  }
257
259
  ELEM.del(_tabLabelElemId);
258
260
  HSystem.views[_tabViewId].die();
261
+
262
+ //Reset labels positions
263
+ this.rightmostPx = 0;
264
+ for(; i < this.tabs.length; i++){
265
+ _tabLabelElemId = this.tabLabels[i];
266
+ _tabLabelWidth = ELEM.getIntStyle(_tabLabelElemId,'width');
267
+ ELEM.setStyle(_tabLabelElemId,this.tabLabelAlign,this.rightmostPx+'px');
268
+ this.rightmostPx += _tabLabelWidth;
269
+ }
270
+ if(this.tabLabelAlign === 'right'){
271
+ ELEM.setStyle(this.markupElemIds[this.tabLabelParentElem],'width',this.rightmostPx+'px');
272
+ }
273
+ else if (this.tabLabelFillBg) {
274
+ ELEM.setStyle(this.markupElemIds.state,'left',this.rightmostPx+'px');
275
+ }
259
276
  }
260
277
  });
261
278
 
@@ -315,7 +332,7 @@ GUITreeTabView = HControl.extend({
315
332
  if( _value.type === undefined || _value.version === undefined ){
316
333
  _value = {
317
334
  'type': 'GUITree',
318
- 'version': 0.9,
335
+ 'version': 1.0,
319
336
  'class': 'HView',
320
337
  'rect': [0,0, null,null, 0,0],
321
338
  'options': { 'style': { 'overflow': 'auto' } },
@@ -9,8 +9,8 @@
9
9
  ***/
10
10
  var//RSence.Controls
11
11
  HTextArea = HTextControl.extend({
12
-
13
- componentName: "textarea"
14
12
 
15
-
13
+ componentName: "textarea",
14
+ defaultKey: function(){return true;} // bypass handler for return presses
15
+
16
16
  });
@@ -91,7 +91,7 @@ EventManagerApp = HApplication.extend
91
91
  # metaKeyDown => The state of the Meta key.
92
92
  # cmdKeyDown => The state of the Command key (or equivalent, like the Windows key).
93
93
  # Note: Will be deprecated in favor of an hash with keys instead of numeric indexes.
94
- status:
94
+ status:
95
95
  0: false
96
96
  button1: false
97
97
  setButton1: (f)->
@@ -293,7 +293,7 @@ EventManagerApp = HApplication.extend
293
293
  _methods.push( 'keyPress' ) unless BROWSER_TYPE.safari or BROWSER_TYPE.ie
294
294
  for _methodName in _methods
295
295
  if _methodName == 'doubleClick'
296
- _eventName = 'dblclick'
296
+ _eventName = 'dblclick'
297
297
  else
298
298
  _eventName = _methodName.toLowerCase()
299
299
  @observe( _targetElem, _eventName, _methodName )
@@ -359,7 +359,7 @@ EventManagerApp = HApplication.extend
359
359
  _idx = @_listeners.byEvent['keyRepeat'].indexOf(_viewId)
360
360
  @_listeners.byEvent['keyRepeat'].splice( _idx, 1 ) if ~_idx
361
361
  unless ~@_listeners.byEvent[_key].indexOf(_viewId)
362
- @_listeners.byEvent[_key].unshift( _viewId )
362
+ @_listeners.byEvent[_key].unshift( _viewId )
363
363
  if _key == 'rectHover' and _value == 'intersects' and
364
364
  not ~@_listeners._rectHoverIntersectMode.indexOf( _viewId )
365
365
  @_listeners._rectHoverIntersectMode.unshift( _viewId )
@@ -552,9 +552,9 @@ EventManagerApp = HApplication.extend
552
552
  ELEM.setStyle( _elemId, 'left', x+'px' )
553
553
  ELEM.setStyle( _elemId, 'top', y+'px' )
554
554
  for _elemId in [ @_debugHighlightT, @_debugHighlightB ]
555
- ELEM.setStyle( _elemId, 'width', w+'px' )
555
+ ELEM.setStyle( _elemId, 'width', w+'px' )
556
556
  for _elemId in [ @_debugHighlightL, @_debugHighlightR ]
557
- ELEM.setStyle( _elemId, 'height', h+'px' )
557
+ ELEM.setStyle( _elemId, 'height', h+'px' )
558
558
  ELEM.setStyle( @_debugHighlightB, 'top', (y+h)+'px' )
559
559
  ELEM.setStyle( @_debugHighlightB, 'left', x+'px' )
560
560
  ELEM.setStyle( @_debugHighlightR, 'top', y+'px' )
@@ -779,7 +779,7 @@ EventManagerApp = HApplication.extend
779
779
  @_listeners.dragged.unshift( _viewId ) unless ~@_listeners.dragged.indexOf( _viewId )
780
780
  _ctrl.startDrag( @status.crsrX, @status.crsrY, @status.button2 )
781
781
  #
782
- # Cancels text selections, which happen by
782
+ # Cancels text selections, which happen by
783
783
  _cancelTextSelection: ->
784
784
  # Remove possible selections.
785
785
  ELEM.get(0).focus()
@@ -1010,11 +1010,11 @@ EventManagerApp = HApplication.extend
1010
1010
  92: 220 # [\|]
1011
1011
  93: 221 # []}]
1012
1012
  39: 222 # ['"]
1013
-
1014
- # Numeric keypad keys can't be mapped on Opera, because Opera
1013
+
1014
+ # Numeric keypad keys can't be mapped on Opera, because Opera
1015
1015
  # doesn't differentiate between the keys on the numeric keypad
1016
1016
  # versus the functionally same keys elsewhere on the keyboard.
1017
-
1017
+
1018
1018
  # Branded keys:
1019
1019
  # Apple Command keys are same as ctrl, but ctrl is 0; Can't be re-mapped reliably.
1020
1020
  # The Windows Menu key also return 0, so it can't be re-mapped either.
@@ -1025,7 +1025,7 @@ EventManagerApp = HApplication.extend
1025
1025
  59: 186 # [;:]
1026
1026
  61: 187 # [=+]
1027
1027
  109: 189 # [-_]
1028
-
1028
+
1029
1029
  # Branded keys:
1030
1030
  224: 91 # Apple Command key to left windows key mapping
1031
1031
  #
@@ -1066,6 +1066,31 @@ EventManagerApp = HApplication.extend
1066
1066
  # Other platforms use CTRL as the command key.
1067
1067
  return _keyCode == 17
1068
1068
  #
1069
+ # Special key method handlers for ESC and RETURN, maybe others in the future
1070
+ _defaultKeyActions:
1071
+ '13': 'defaultKey' # return
1072
+ '27': 'escKey' # esc
1073
+ #
1074
+ # Traverses down the parent hierarchy searching for a parent object
1075
+ # that responds true to _methodName. If _ctrl is undefined, use
1076
+ # a special default rule of auto-selecting the active control and
1077
+ # checking all of its siblings before traversing.
1078
+ defaultKey: (_methodName,_ctrl)->
1079
+ if _ctrl?
1080
+ return true if _ctrl[_methodName]? and _ctrl[_methodName]()
1081
+ else # first special rules, check same
1082
+ return null unless @_listeners.active
1083
+ _ctrl = @_views[@_listeners.active[0]]
1084
+ return true if _ctrl[_methodName]? and _ctrl[_methodName]()
1085
+ for _viewId in _ctrl.parent.views
1086
+ continue if _ctrl.viewId == _viewId
1087
+ _ctrl = @_views[_viewId]
1088
+ if _ctrl[_methodName]?
1089
+ return true if _ctrl[_methodName]()
1090
+ if _ctrl.parent?
1091
+ return true if @defaultKey(_methodName,_ctrl.parent)
1092
+ return null
1093
+ #
1069
1094
  # Handles the keyDown event
1070
1095
  keyDown: (e)->
1071
1096
  @_modifiers(e)
@@ -1088,6 +1113,13 @@ EventManagerApp = HApplication.extend
1088
1113
  _ctrl = @_views[_viewId]
1089
1114
  if _ctrl.keyDown?
1090
1115
  _stop = true if _ctrl.keyDown(_keyCode)
1116
+ #
1117
+ # Some keys are special (esc and return) and they have their own
1118
+ # special events: defaultKey and escKey, which aren't limited
1119
+ # to instances of HControl, but any parent object will work.
1120
+ if not _repeating and @_defaultKeyActions[_keyCode.toString()]
1121
+ _defaultKeyMethod = @_defaultKeyActions[_keyCode.toString()]
1122
+ _stop = true if @defaultKey(_defaultKeyMethod)
1091
1123
  @_lastKeyDown = _keyCode
1092
1124
  Event.stop(e) if _stop
1093
1125
  keyUp: (e)->
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.3
4
+ version: 3.0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Riassence Inc.
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-05-11 00:00:00.000000000 Z
12
+ date: 2013-05-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rsence-deps
@@ -263,7 +263,6 @@ files:
263
263
  - client/js/foundation/control/valuematrix/valuematrix.js
264
264
  - client/js/foundation/control/valueresponder/valueresponder.js
265
265
  - client/js/foundation/eventmanager/eventmanager.coffee
266
- - client/js/foundation/eventmanager/eventmanager.js
267
266
  - client/js/foundation/geom/point/point.js
268
267
  - client/js/foundation/geom/rect/rect.js
269
268
  - client/js/foundation/json_renderer/json_renderer.js