LucaVivona commited on
Commit
467436a
β€’
1 Parent(s): 98c2891

πŸ“ update size of node

Browse files
frontend/src/components/Nodes/Custom.js CHANGED
@@ -74,10 +74,8 @@ export default class CustomNodeIframe extends React.Component {
74
 
75
  }
76
 
77
- //(Experimental) resize nodes by dragging
78
  initial = (e) => {
79
- e.dataTransfer.setDragImage(new Image(), 0, 0)
80
- console.log( this.myRef.current.offsetHeight, this.myRef.current.offsetWidth, this.myRef.current.getBoundingClientRect().left, this.myRef.current.getBoundingClientRect().top )
81
  this.original_width = this.myRef.current.offsetWidth
82
  this.original_height = this.myRef.current.offsetHeight
83
 
@@ -198,7 +196,7 @@ export default class CustomNodeIframe extends React.Component {
198
  </div>
199
  { this.state.size && <>
200
 
201
- <div id="remove-ghost" className={`absolute select-none -bottom-0 right-0 w-5 h-5border-2 shadow-2xl rounded-xl z-10 cursor-nwse-resize `}
202
  style={{"userDrag": "none"}}
203
  draggable
204
  onDragStart={(e) => { this.initial(e) }}
 
74
 
75
  }
76
 
77
+ //resize nodes by dragging
78
  initial = (e) => {
 
 
79
  this.original_width = this.myRef.current.offsetWidth
80
  this.original_height = this.myRef.current.offsetHeight
81
 
 
196
  </div>
197
  { this.state.size && <>
198
 
199
+ <div id="remove-ghost" className={`absolute select-none -bottom-0 right-0 w-5 h-5border-2 shadow-2xl rounded-xl z-10 cursor-nwse-resize hover:opacity-50 `}
200
  style={{"userDrag": "none"}}
201
  draggable
202
  onDragStart={(e) => { this.initial(e) }}
frontend/src/css/dist/output.css CHANGED
@@ -1431,6 +1431,10 @@ video {
1431
  opacity: 0.6;
1432
  }
1433
 
 
 
 
 
1434
  .shadow-lg {
1435
  --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
1436
  --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);
@@ -1537,6 +1541,10 @@ video {
1537
  border-color: rgb(74 222 128 / var(--tw-border-opacity));
1538
  }
1539
 
 
 
 
 
1540
  .focus\:border-sky-500:focus {
1541
  --tw-border-opacity: 1;
1542
  border-color: rgb(14 165 233 / var(--tw-border-opacity));
 
1431
  opacity: 0.6;
1432
  }
1433
 
1434
+ .opacity-50 {
1435
+ opacity: 0.5;
1436
+ }
1437
+
1438
  .shadow-lg {
1439
  --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
1440
  --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);
 
1541
  border-color: rgb(74 222 128 / var(--tw-border-opacity));
1542
  }
1543
 
1544
+ .hover\:opacity-50:hover {
1545
+ opacity: 0.5;
1546
+ }
1547
+
1548
  .focus\:border-sky-500:focus {
1549
  --tw-border-opacity: 1;
1550
  border-color: rgb(14 165 233 / var(--tw-border-opacity));