js/foundation/view/view.js in rsence-pre-2.3.0.1 vs js/foundation/view/view.js in rsence-pre-2.3.0.2
- old
+ new
@@ -781,11 +781,11 @@
this.markupElemIds = {};
for(var i=0; i < this.markupElemNames.length; i++ ) {
var _partName = this.markupElemNames[ i ],
_elemName = _partName + this.elemId,
_htmlIdMatch = ' id="' + _elemName + '"';
- if( this.markup.indexOf( _htmlIdMatch ) !== -1 ) {
+ if( ~this.markup.indexOf( _htmlIdMatch ) ) {
this.markupElemIds[ _partName ] = this.bindDomElement( _elemName );
}
}
// ELEM.setStyle(this.elemId, 'display', this.displayMode );
@@ -1430,11 +1430,11 @@
this.parent.views.splice(_viewPIdx,1);
HSystem.delView(this.viewId);
this.parent.viewsZOrder.splice( _viewZIdx, 1 );
var _sysUpdateZIndexOfChildrenBufferIndex = HSystem._updateZIndexOfChildrenBuffer.indexOf( this.viewId );
- if(_sysUpdateZIndexOfChildrenBufferIndex !== -1){
+ if(~_sysUpdateZIndexOfChildrenBufferIndex){
HSystem._updateZIndexOfChildrenBuffer.splice( _sysUpdateZIndexOfChildrenBufferIndex, 1 );
}
this._updateZIndexAllSiblings();
this.parent = null;
@@ -2003,11 +2003,11 @@
* that is to be removed from the cache.
*
**/
unbindDomElement: function(_elementId) {
var _indexOfElementId = this._domElementBindings.indexOf(_elementId);
- if (_indexOfElementId > -1) {
+ if (~_indexOfElementId) {
ELEM.del(_elementId);
this._domElementBindings.splice(_indexOfElementId, 1);
}
},
@@ -2081,10 +2081,10 @@
isParentOf: function( _obj ){
if( !_obj ){
return false;
}
if( typeof _obj['hasAncestor'] === 'function' ){
- if( _obj.parents.indexOf( this ) !== -1 ){
+ if( ~_obj.parents.indexOf( this ) ){
return true;
}
}
return false;
},