Skip to content

Commit

Permalink
make the trash can lid animate again and fix the cursor to show an x …
Browse files Browse the repository at this point in the history
…when things will be removed.
  • Loading branch information
picklesrus committed Jan 18, 2017
1 parent 0bbdf34 commit 260e42d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion core/block_svg.js
Original file line number Diff line number Diff line change
Expand Up @@ -1181,8 +1181,10 @@ Blockly.BlockSvg.prototype.updatePreviews = function(closestConnection,
Blockly.localConnection_ = null;
}

var wouldDeleteBlock = this.updateCursor_(e, closestConnection);

// Add an insertion marker or replacement marker if needed.
if (closestConnection &&
if (!wouldDeleteBlock && closestConnection &&
closestConnection != Blockly.highlightedConnection_ &&
!closestConnection.sourceBlock_.isInsertionMarker()) {
Blockly.highlightedConnection_ = closestConnection;
Expand Down
4 changes: 2 additions & 2 deletions core/scrollbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -411,8 +411,8 @@ Blockly.Scrollbar.prototype.resize = function(opt_metrics) {

// If the origin has changed (e.g. the toolbox is moving from start to end)
// we want to continue with the resize even if workspace metrics haven't.
if (this.originHasChanged) {
this.originHasChanged = false;
if (this.originHasChanged_) {
this.originHasChanged_ = false;
} else if (Blockly.Scrollbar.metricsAreEquivalent_(hostMetrics,
this.oldHostMetrics_)) {
return;
Expand Down

0 comments on commit 260e42d

Please sign in to comment.