mirror of
https://github.com/google/blockly.git
synced 2026-01-25 17:50:10 +01:00
[WIP] Merge scrollbar.js
This commit is contained in:
@@ -74,7 +74,6 @@ Blockly.ScrollbarPair.prototype.dispose = function() {
|
||||
* Also reposition the corner rectangle.
|
||||
*/
|
||||
Blockly.ScrollbarPair.prototype.resize = function() {
|
||||
var start = new Date().getTime();
|
||||
// Look up the host metrics once, and use for both scrollbars.
|
||||
var hostMetrics = this.workspace_.getMetrics();
|
||||
if (!hostMetrics) {
|
||||
@@ -128,10 +127,6 @@ Blockly.ScrollbarPair.prototype.resize = function() {
|
||||
}
|
||||
// Cache the current metrics to potentially short-cut the next resize event.
|
||||
this.oldHostMetrics_ = hostMetrics;
|
||||
var stop = new Date().getTime();
|
||||
var timeDiff = stop - start;
|
||||
Blockly.Instrument.stats.scrollBarResizeCalls++; //***lyn
|
||||
Blockly.Instrument.stats.scrollBarResizeTime += timeDiff; //***lyn
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
***************
|
||||
*** 27,32 ****
|
||||
goog.provide('Blockly.Scrollbar');
|
||||
goog.provide('Blockly.ScrollbarPair');
|
||||
|
||||
goog.require('goog.userAgent');
|
||||
|
||||
|
||||
--- 27,33 ----
|
||||
goog.provide('Blockly.Scrollbar');
|
||||
goog.provide('Blockly.ScrollbarPair');
|
||||
|
||||
+ goog.require('Blockly.Instrument'); // lyn's instrumentation code
|
||||
goog.require('goog.userAgent');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user