Remove Blockly.removeAllRanges and replace it with calls to add/remove

css to mark text as unselectable instead.  I can't prove this is
significantly faster with numbers since the call to setup the time out
costs ~.1ms and the call when the timer fires is ~.05.  This happens on almost
every mouse event though.  Plus, it seems to remove a flicker of highlighting when
frames are skipped and keeps scrolling via the scrollbar from highlighting.
This commit is contained in:
Katelyn Mann
2016-03-23 14:39:02 -07:00
parent 39fbd24659
commit b11bd4fb71
9 changed files with 22 additions and 26 deletions

View File

@@ -390,7 +390,6 @@ Blockly.Toolbox.TreeControl.prototype.createNode = function(opt_html) {
* @override
*/
Blockly.Toolbox.TreeControl.prototype.setSelectedItem = function(node) {
Blockly.removeAllRanges();
var toolbox = this.toolbox_;
if (node == this.selectedItem_ || node == toolbox.tree_) {
return;