js/foundation/view/view.js in rsence-2.0.0.10.pre vs js/foundation/view/view.js in rsence-2.0.0.11
- old
+ new
@@ -27,11 +27,11 @@
** var mySubView1 = HView.nu( rect2, myViewIntance );
** var rect3 [20, 20, 50, 50];
** var mySubView2 = HView.nu( rect3, mySubView1 );
**
***/
-
+var//RSence.Foundation
HView = HClass.extend({
/** Component specific theme path.
**/
themePath: null,
@@ -107,17 +107,10 @@
* for the _rect parameter of setRect or the constructor.
* Can be set directly using the setFlexBottom method.
**/
flexBottomOffset: 0,
-/** The componentBehaviour array tells other classes what to
- * expect of the component's API and visual behaviour.
- * The first index is 'view' by default for all classes
- * inherited from HView.
- **/
- componentBehaviour: ['view'],
-
/** The drawn flag is false before the component is visually
* drawn, it's true after it's drawn.
**/
drawn: false,
@@ -1615,16 +1608,17 @@
}
if (!_wrap){
_extraCss += 'white-space:nowrap;';
}
- var _stringElem = ELEM.make(_elemId);
- ELEM.setCSS(_stringElem, "visibility:hidden;position:absolute;"+_extraCss);
+ var _stringElem = ELEM.make(_elemId,'span');
+ ELEM.setCSS(_stringElem, "visibility:hidden;"+_extraCss);
ELEM.setHTML(_stringElem, _string);
- ELEM.flushLoop();
+ // ELEM.flushLoop();
var _visibleSize=ELEM.getVisibleSize(_stringElem);
+ // console.log('visibleSize',_visibleSize);
ELEM.del(_stringElem);
- return _visibleSize;
+ return [_visibleSize[0]+_visibleSize[0]%2,_visibleSize[1]+_visibleSize[1]%2];
},
/** Returns the string width
**/
stringWidth: function(_string, _length, _elemId, _extraCss){