Skip to content

Commit

Permalink
remove unnecessary semicolons; set prototype properties
Browse files Browse the repository at this point in the history
  • Loading branch information
mkslanc committed Mar 23, 2023
1 parent 7c9211c commit e058830
Show file tree
Hide file tree
Showing 50 changed files with 1,193 additions and 1,199 deletions.
27 changes: 14 additions & 13 deletions src/anchor.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ class Anchor {
this.setPosition(row.row, row.column);
else
this.setPosition(row, column);
};
}

/**
* Returns an object identifying the `row` and `column` position of the current anchor.
* @returns {Ace.Point}
**/
getPosition() {
return this.$clipPositionToDocument(this.row, this.column);
};
}

/**
*
Expand All @@ -39,12 +39,8 @@ class Anchor {
**/
getDocument() {
return this.document;
};

/**
* experimental: allows anchor to stick to the next on the left
*/
$insertRight = false;
}

/**
* Fires whenever the anchor position changes.
*
Expand All @@ -71,7 +67,7 @@ class Anchor {

var point = $getTransformedPoint(delta, {row: this.row, column: this.column}, this.$insertRight);
this.setPosition(point.row, point.column, true);
};
}

/**
* Sets the anchor position to the specified row and column. If `noClip` is `true`, the position is not clipped.
Expand Down Expand Up @@ -105,15 +101,15 @@ class Anchor {
old: old,
value: pos
});
};
}

/**
* When called, the `"change"` event listener is removed.
*
**/
detach() {
this.document.off("change", this.$onChange);
};
}

/**
* When called, the `"change"` event listener is appended.
Expand All @@ -123,7 +119,7 @@ class Anchor {
attach(doc) {
this.document = doc || this.document;
this.document.on("change", this.$onChange);
};
}

/**
* Clips the anchor position to the specified row and column.
Expand Down Expand Up @@ -152,9 +148,14 @@ class Anchor {
pos.column = 0;

return pos;
};
}
}

/**
* experimental: allows anchor to stick to the next on the left
*/
Anchor.prototype.$insertRight = false;

oop.implement(Anchor.prototype, EventEmitter);

function $pointsInOrder(point1, point2, equalPointsInOrder) {
Expand Down
Loading

0 comments on commit e058830

Please sign in to comment.