Include padding when calculating the printMaring
This commit is contained in:
parent
725820e05d
commit
172b9e9ca8
1 changed files with 3 additions and 2 deletions
|
|
@ -116,8 +116,8 @@ var VirtualRenderer = function(container, theme) {
|
||||||
this.$loop = new RenderLoop(this.$renderChanges.bind(this));
|
this.$loop = new RenderLoop(this.$renderChanges.bind(this));
|
||||||
this.$loop.schedule(this.CHANGE_FULL);
|
this.$loop.schedule(this.CHANGE_FULL);
|
||||||
|
|
||||||
this.$updatePrintMargin();
|
|
||||||
this.setPadding(4);
|
this.setPadding(4);
|
||||||
|
this.$updatePrintMargin();
|
||||||
};
|
};
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
|
|
@ -280,7 +280,7 @@ var VirtualRenderer = function(container, theme) {
|
||||||
}
|
}
|
||||||
|
|
||||||
var style = this.$printMarginEl.style;
|
var style = this.$printMarginEl.style;
|
||||||
style.left = (this.characterWidth * this.$printMarginColumn) + "px";
|
style.left = ((this.characterWidth * this.$printMarginColumn) + this.$padding * 2) + "px";
|
||||||
style.visibility = this.$showPrintMargin ? "visible" : "hidden";
|
style.visibility = this.$showPrintMargin ? "visible" : "hidden";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -320,6 +320,7 @@ var VirtualRenderer = function(container, theme) {
|
||||||
this.$padding = padding;
|
this.$padding = padding;
|
||||||
this.content.style.padding = "0 " + padding + "px";
|
this.content.style.padding = "0 " + padding + "px";
|
||||||
this.$loop.schedule(this.CHANGE_FULL);
|
this.$loop.schedule(this.CHANGE_FULL);
|
||||||
|
this.$updatePrintMargin();
|
||||||
};
|
};
|
||||||
|
|
||||||
this.onScroll = function(e) {
|
this.onScroll = function(e) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue