do not force reflow while updating the gutter
This commit is contained in:
parent
88ff6cf50b
commit
6e513610b3
2 changed files with 6 additions and 9 deletions
|
|
@ -131,7 +131,6 @@
|
|||
|
||||
.ace_gutter .ace_layer {
|
||||
position: relative;
|
||||
min-width: 40px;
|
||||
width: auto;
|
||||
text-align: right;
|
||||
pointer-events: auto;
|
||||
|
|
|
|||
|
|
@ -149,17 +149,15 @@ var Gutter = function(parentEl) {
|
|||
i++;
|
||||
}
|
||||
|
||||
if (this.session.$useWrapMode)
|
||||
html.push(
|
||||
"<div class='ace_gutter-cell' style='pointer-events:none;opacity:0'>",
|
||||
this.session.getLength() - 1,
|
||||
"</div>"
|
||||
);
|
||||
|
||||
this.element = dom.setInnerHtml(this.element, html.join(""));
|
||||
this.element.style.height = config.minHeight + "px";
|
||||
|
||||
var gutterWidth = this.element.offsetWidth;
|
||||
if (this.session.$useWrapMode)
|
||||
i = this.session.getLength();
|
||||
|
||||
var gutterWidth = ("" + --i).length * config.characterWidth;
|
||||
var padding = this.$padding || this.$computePadding();
|
||||
gutterWidth += padding.left + padding.right;
|
||||
if (gutterWidth !== this.gutterWidth) {
|
||||
this.gutterWidth = gutterWidth;
|
||||
this._emit("changeGutterWidth", gutterWidth);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue