Skip to content

Commit cf18b34

Browse files
committed
fix: css text appending styles on every update call causing the string to grow infinitely
1 parent 5447a95 commit cf18b34

File tree

1 file changed

+19
-16
lines changed

1 file changed

+19
-16
lines changed

src/LiveDevelopment/BrowserScripts/RemoteFunctions.js

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4358,22 +4358,25 @@ function RemoteFunctions(config = {}) {
43584358
const docWidth = document.documentElement.scrollWidth;
43594359

43604360
// Position lines
4361-
this.lineElements.left.style.cssText += `
4362-
width:1px; height:${docHeight}px;
4363-
left:${edges.left}px; top:0px;
4364-
`;
4365-
this.lineElements.right.style.cssText += `
4366-
width:1px; height:${docHeight}px;
4367-
left:${edges.right}px; top:0px;
4368-
`;
4369-
this.lineElements.top.style.cssText += `
4370-
height:1px; width:${docWidth}px;
4371-
top:${edges.top}px; left:0px;
4372-
`;
4373-
this.lineElements.bottom.style.cssText += `
4374-
height:1px; width:${docWidth}px;
4375-
top:${edges.bottom}px; left:0px;
4376-
`;
4361+
this.lineElements.left.style.width = '1px';
4362+
this.lineElements.left.style.height = docHeight + 'px';
4363+
this.lineElements.left.style.left = edges.left + 'px';
4364+
this.lineElements.left.style.top = '0px';
4365+
4366+
this.lineElements.right.style.width = '1px';
4367+
this.lineElements.right.style.height = docHeight + 'px';
4368+
this.lineElements.right.style.left = edges.right + 'px';
4369+
this.lineElements.right.style.top = '0px';
4370+
4371+
this.lineElements.top.style.height = '1px';
4372+
this.lineElements.top.style.width = docWidth + 'px';
4373+
this.lineElements.top.style.top = edges.top + 'px';
4374+
this.lineElements.top.style.left = '0px';
4375+
4376+
this.lineElements.bottom.style.height = '1px';
4377+
this.lineElements.bottom.style.width = docWidth + 'px';
4378+
this.lineElements.bottom.style.top = edges.bottom + 'px';
4379+
this.lineElements.bottom.style.left = '0px';
43774380

43784381
const x1 = Math.floor(edges.left + 1);
43794382
const x2 = x1 + rect.width;

0 commit comments

Comments
 (0)