Skip to content

Commit

Permalink
chore: clean up insertion marker code (#6602)
Browse files Browse the repository at this point in the history
* chore: move comments

* chore: remove underscores from private property names

* chore: remove underscores from properties and methods in insertion marker manager

* chore: format

* chore: track closestConnection and localConnection as a single object

* chore: format

* chore: add comments and simplify shouldUpdatePreviews

* chore(docs): add jsdoc for new params

* chore: use destructuring assignments

* chore: improve readability

* chore: address review feedback

* chore: respond to review feedback

* chore: fix types in shouldDelete

* chore: make wouldDeleteBlock a property

* chore: format
  • Loading branch information
rachel-fenichel authored Nov 10, 2022
1 parent 1f862cb commit 92efdb9
Show file tree
Hide file tree
Showing 3 changed files with 249 additions and 317 deletions.
2 changes: 1 addition & 1 deletion core/block_dragger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ export class BlockDragger implements IBlockDragger {

this.draggedConnectionManager_.update(delta, this.dragTarget_);
const oldWouldDeleteBlock = this.wouldDeleteBlock_;
this.wouldDeleteBlock_ = this.draggedConnectionManager_.wouldDeleteBlock();
this.wouldDeleteBlock_ = this.draggedConnectionManager_.wouldDeleteBlock;
if (oldWouldDeleteBlock !== this.wouldDeleteBlock_) {
// Prevent unnecessary add/remove class calls.
this.updateCursorDuringBlockDrag_();
Expand Down
Loading

0 comments on commit 92efdb9

Please sign in to comment.