@@ -1233,9 +1233,8 @@ function RemoteFunctions(config) {
12331233 } ;
12341234
12351235 // Node info box to display DOM node ID and classes on hover
1236- function NodeInfoBox ( element , isFromClick ) {
1236+ function NodeInfoBox ( element ) {
12371237 this . element = element ;
1238- this . isFromClick = isFromClick || false ;
12391238 this . remove = this . remove . bind ( this ) ;
12401239 this . create ( ) ;
12411240 }
@@ -1377,7 +1376,7 @@ function RemoteFunctions(config) {
13771376
13781377 .id-name,
13791378 .class-name {
1380- margin-top: 3px ;
1379+ margin-top: 2px ;
13811380 }
13821381
13831382 .exceeded-classes {
@@ -1421,13 +1420,11 @@ function RemoteFunctions(config) {
14211420 boxElement . style . left = nodeInfoBoxPos . leftPos + 'px' ;
14221421 boxElement . style . top = nodeInfoBoxPos . topPos + 'px' ;
14231422
1424- if ( this . isFromClick ) {
1425- const isBoxOverlapping = this . _checkOverlap ( nodeInfoBoxPos , nodeInfoBoxDimensions ) ;
1426- if ( isBoxOverlapping ) {
1427- const newPos = this . _getBoxPosition ( nodeInfoBoxDimensions , true ) ;
1428- boxElement . style . left = newPos . leftPos + 'px' ;
1429- boxElement . style . top = newPos . topPos + 'px' ;
1430- }
1423+ const isBoxOverlapping = this . _checkOverlap ( nodeInfoBoxPos , nodeInfoBoxDimensions ) ;
1424+ if ( isBoxOverlapping ) {
1425+ const newPos = this . _getBoxPosition ( nodeInfoBoxDimensions , true ) ;
1426+ boxElement . style . left = newPos . leftPos + 'px' ;
1427+ boxElement . style . top = newPos . topPos + 'px' ;
14311428 }
14321429 }
14331430 } ,
@@ -1820,10 +1817,7 @@ function RemoteFunctions(config) {
18201817 if ( _nodeInfoBox ) {
18211818 _nodeInfoBox . remove ( ) ;
18221819 }
1823- // check if this element is already clicked (has more options box)
1824- // this is needed so that we can check for overlapping issue among the boxes
1825- const isAlreadyClicked = previouslyClickedElement === event . target && _nodeMoreOptionsBox !== null ;
1826- _nodeInfoBox = new NodeInfoBox ( event . target , isAlreadyClicked ) ;
1820+ _nodeInfoBox = new NodeInfoBox ( event . target ) ;
18271821 }
18281822 }
18291823 }
@@ -1895,7 +1889,7 @@ function RemoteFunctions(config) {
18951889 if ( _nodeInfoBox ) {
18961890 _nodeInfoBox . remove ( ) ;
18971891 }
1898- _nodeInfoBox = new NodeInfoBox ( element , true ) ; // true means that the element was selected
1892+ _nodeInfoBox = new NodeInfoBox ( element ) ;
18991893 } else {
19001894 // Element is hidden, so don't show UI boxes but still apply visual styling
19011895 _nodeMoreOptionsBox = null ;
@@ -2068,7 +2062,7 @@ function RemoteFunctions(config) {
20682062
20692063 if ( _nodeInfoBox ) {
20702064 _nodeInfoBox . remove ( ) ;
2071- _nodeInfoBox = new NodeInfoBox ( element , true ) ; // true means it came from a click
2065+ _nodeInfoBox = new NodeInfoBox ( element ) ;
20722066 }
20732067 }
20742068 }
0 commit comments