Skip to content

Commit 3a7a3cf

Browse files
committed
refactor: remoteHighlight var to fn scope instead of global
1 parent 06efeb7 commit 3a7a3cf

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

src/LiveDevelopment/BrowserScripts/RemoteFunctions.js

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -111,24 +111,6 @@ function RemoteFunctions(config = {}) {
111111
*/
112112
var _editHandler;
113113

114-
let remoteHighlight = {
115-
animateStartValue: {
116-
"background-color": "rgba(0, 162, 255, 0.5)",
117-
"opacity": 0
118-
},
119-
animateEndValue: {
120-
"background-color": "rgba(0, 162, 255, 0)",
121-
"opacity": 0.6
122-
},
123-
paddingStyling: {
124-
"background-color": "rgba(200, 249, 197, 0.7)"
125-
},
126-
marginStyling: {
127-
"background-color": "rgba(249, 204, 157, 0.7)"
128-
},
129-
borderColor: "rgba(200, 249, 197, 0.85)",
130-
showPaddingMargin: true
131-
};
132114
let strings = {}, icons = {}, cssStyles = {}; // these will be injected below
133115
// the below code comment is replaced by added scripts for extensibility
134116
// DONT_STRIP_MINIFY:REPLACE_WITH_ADDED_REMOTE_CONSTANT_SCRIPTS
@@ -4059,6 +4041,24 @@ function RemoteFunctions(config = {}) {
40594041
return false;
40604042
},
40614043
_makeHighlightDiv: function (element, doAnimation) {
4044+
const remoteHighlight = {
4045+
animateStartValue: {
4046+
"background-color": "rgba(0, 162, 255, 0.5)",
4047+
"opacity": 0
4048+
},
4049+
animateEndValue: {
4050+
"background-color": "rgba(0, 162, 255, 0)",
4051+
"opacity": 0.6
4052+
},
4053+
paddingStyling: {
4054+
"background-color": "rgba(200, 249, 197, 0.7)"
4055+
},
4056+
marginStyling: {
4057+
"background-color": "rgba(249, 204, 157, 0.7)"
4058+
},
4059+
borderColor: "rgba(200, 249, 197, 0.85)",
4060+
showPaddingMargin: true
4061+
};
40624062
var elementBounds = element.getBoundingClientRect(),
40634063
highlight = window.document.createElement("div"),
40644064
elementStyling = window.getComputedStyle(element),

0 commit comments

Comments
 (0)