js/foundation/view/view.js in rsence-pre-2.3.0.6 vs js/foundation/view/view.js in rsence-pre-2.3.0.7
- old
+ new
@@ -580,10 +580,30 @@
else if(this.elemId !== undefined) {
return this.elemId;
}
return 0;
},
+
+/** = Description
+ * The selectable state defines whe
+ *
+ **/
+ textSelectable: false,
+ updateTextSelectable: function(){
+ if( this.textSelectable ){
+ ELEM.delClassName( this.elemId, 'textunselectable' );
+ ELEM.addClassName( this.elemId, 'textselectable' );
+ }
+ else {
+ ELEM.delClassName( this.elemId, 'textselectable' );
+ ELEM.addClassName( this.elemId, 'textunselectable' );
+ }
+ },
+ setTextSelectable: function(_flag){
+ this.textSelectable = !!_flag;
+ this.updateSelectable();
+ },
/** --
* = Description
* The _createElement method calls the methods required to initialize the
* main DOM element of the view.
@@ -600,9 +620,13 @@
ELEM.addClassName( this.elemId, this.theme );
}
else {
ELEM.addClassName( this.elemId, HThemeManager.currentTheme );
}
+ if( this.options.textSelectable !== undefined ){
+ this.textSelectable = this.options.textSelectable;
+ }
+ this.updateTextSelectable();
}
},
/** = Description
* The +drawRect+ method refreshes the dimensions of the view.