mirror of
https://github.com/google/blockly.git
synced 2026-01-18 14:27:12 +01:00
[WIP] Merge trashcan.js
This commit is contained in:
@@ -26,7 +26,6 @@
|
||||
|
||||
goog.provide('Blockly.Trashcan');
|
||||
|
||||
goog.require('Blockly.Instrument'); // lyn's instrumentation code
|
||||
goog.require('goog.Timer');
|
||||
goog.require('goog.dom');
|
||||
goog.require('goog.math');
|
||||
@@ -259,10 +258,6 @@ Blockly.Trashcan.prototype.position = function() {
|
||||
}
|
||||
this.svgGroup_.setAttribute('transform',
|
||||
'translate(' + this.left_ + ',' + this.top_ + ')');
|
||||
var stop = new Date().getTime();
|
||||
var timeDiff = stop - start;
|
||||
Blockly.Instrument.stats.trashCanPositionCalls++; //***lyn
|
||||
Blockly.Instrument.stats.trashCanPositionTime += timeDiff; //***lyn
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
***************
|
||||
*** 218,223 ****
|
||||
* @private
|
||||
*/
|
||||
Blockly.Trashcan.prototype.position_ = function() {
|
||||
var metrics = this.workspace_.getMetrics();
|
||||
if (!metrics) {
|
||||
// There are no metrics available (workspace is probably not visible).
|
||||
--- 219,225 ----
|
||||
* @private
|
||||
*/
|
||||
Blockly.Trashcan.prototype.position_ = function() {
|
||||
+ var start = new Date().getTime();
|
||||
var metrics = this.workspace_.getMetrics();
|
||||
if (!metrics) {
|
||||
// There are no metrics available (workspace is probably not visible).
|
||||
Reference in New Issue
Block a user