mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-03 23:55:04 +08:00
Resizeable comments
This commit is contained in:
5
.vscode/extensions.json
vendored
Normal file
5
.vscode/extensions.json
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"recommendations": [
|
||||
"runem.lit-plugin"
|
||||
]
|
||||
}
|
||||
6
.vscode/settings.json
vendored
6
.vscode/settings.json
vendored
@@ -1,5 +1,9 @@
|
||||
{
|
||||
"files.trimFinalNewlines": true,
|
||||
"files.insertFinalNewline": true,
|
||||
"javascript.format.semicolons": "remove"
|
||||
"javascript.format.semicolons": "remove",
|
||||
"editor.formatOnSaveMode": "modificationsIfAvailable",
|
||||
"editor.rulers": [
|
||||
120
|
||||
],
|
||||
}
|
||||
|
||||
95
dist/css/ueb-style.css
vendored
95
dist/css/ueb-style.css
vendored
@@ -321,10 +321,6 @@ ueb-node {
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
ueb-blueprint[data-scrolling=false][data-selecting=false] ueb-node {
|
||||
cursor: move;
|
||||
}
|
||||
|
||||
.ueb-node-border {
|
||||
margin: -3px;
|
||||
padding: 3px;
|
||||
@@ -361,6 +357,10 @@ ueb-node[data-selected=true] > .ueb-node-border {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
ueb-blueprint[data-scrolling=false][data-selecting=false] .ueb-node-wrapper {
|
||||
cursor: move;
|
||||
}
|
||||
|
||||
.ueb-zoom--2 .ueb-node-wrapper {
|
||||
box-shadow: none;
|
||||
padding: 0;
|
||||
@@ -528,10 +528,20 @@ ueb-node.ueb-node-style-glass .ueb-node-outputs:first-child {
|
||||
padding-left: 8px;
|
||||
}
|
||||
|
||||
ueb-node.ueb-node-style-comment {
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
ueb-node.ueb-node-style-comment .ueb-node-border {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
ueb-node.ueb-node-style-comment .ueb-node-wrapper {
|
||||
padding: 0;
|
||||
height: 100%;
|
||||
border-radius: 0;
|
||||
background: rgba(var(--ueb-node-color), 0.5);
|
||||
box-shadow: 0;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
ueb-node.ueb-node-style-comment .ueb-node-top {
|
||||
@@ -702,7 +712,6 @@ ueb-pin[data-type="/Script/CoreUObject.LinearColor"] .ueb-pin-input {
|
||||
line-height: calc(1em + 1px);
|
||||
background: none;
|
||||
color: inherit;
|
||||
cursor: text;
|
||||
overflow: auto;
|
||||
}
|
||||
.ueb-pin-input-content::-webkit-scrollbar {
|
||||
@@ -715,6 +724,10 @@ ueb-pin[data-type="/Script/CoreUObject.LinearColor"] .ueb-pin-input {
|
||||
margin: 4px;
|
||||
}
|
||||
|
||||
ueb-blueprint[data-scrolling=false][data-selecting=false] .ueb-node-wrapper {
|
||||
cursor: move;
|
||||
}
|
||||
|
||||
.ueb-button {
|
||||
min-width: 60px;
|
||||
border: 1px solid #0f0f0f;
|
||||
@@ -803,6 +816,76 @@ ueb-window .ueb-pin-input-content {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.ueb-resizeable-top,
|
||||
.ueb-resizeable-top-right,
|
||||
.ueb-resizeable-top-left {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
height: 10px;
|
||||
}
|
||||
|
||||
.ueb-resizeable-top {
|
||||
right: 0;
|
||||
left: 0;
|
||||
cursor: ns-resize;
|
||||
}
|
||||
|
||||
.ueb-resizeable-top-right {
|
||||
right: 0;
|
||||
width: 10px;
|
||||
cursor: nesw-resize;
|
||||
}
|
||||
|
||||
.ueb-resizeable-top-left {
|
||||
left: 0;
|
||||
width: 10px;
|
||||
cursor: nwse-resize;
|
||||
}
|
||||
|
||||
.ueb-resizeable-right {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
width: 10px;
|
||||
cursor: ew-resize;
|
||||
}
|
||||
|
||||
.ueb-resizeable-bottom,
|
||||
.ueb-resizeable-bottom-right,
|
||||
.ueb-resizeable-bottom-left {
|
||||
position: absolute;
|
||||
bottom: -3px;
|
||||
height: 10px;
|
||||
cursor: ns-resize;
|
||||
}
|
||||
|
||||
.ueb-resizeable-bottom {
|
||||
right: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.ueb-resizeable-bottom-right {
|
||||
right: 0;
|
||||
width: 10px;
|
||||
cursor: nwse-resize;
|
||||
}
|
||||
|
||||
.ueb-resizeable-bottom-left {
|
||||
left: 0;
|
||||
width: 10px;
|
||||
cursor: nesw-resize;
|
||||
}
|
||||
|
||||
.ueb-resizeable-left {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 10px;
|
||||
cursor: ew-resize;
|
||||
}
|
||||
|
||||
ueb-window {
|
||||
display: block;
|
||||
position: absolute;
|
||||
|
||||
2
dist/css/ueb-style.css.map
vendored
2
dist/css/ueb-style.css.map
vendored
@@ -1 +1 @@
|
||||
{"version":3,"sourceRoot":"","sources":["../../scss/style.scss","../../scss/ueb-knot.scss","../../scss/ueb-link.scss","../../scss/ueb-node.scss","../../scss/ueb-pin.scss","../../scss/ueb-ui-controls.scss","../../scss/ueb-window.scss"],"names":[],"mappings":"AAAA;EACI;EACA;EACA,KACI;;AAIR;EACI;EACA;EACA,KACI;;AAIR;EACI;EACA;EACA,KACI;;AAIR;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGJ;EACI;;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGJ;EACI;EACA;EACA;;;AAGJ;EACI;EACA;EACA;EACA;;;AAGJ;EACI;;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA,kBAEI;EA0BJ,iBAEI;EAQJ;EACA;EACA;EACA;EACA;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;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","file":"ueb-style.css"}
|
||||
{"version":3,"sourceRoot":"","sources":["../../scss/style.scss","../../scss/ueb-knot.scss","../../scss/ueb-link.scss","../../scss/ueb-node.scss","../../scss/ueb-pin.scss","../../scss/ueb-ui-controls.scss","../../scss/ueb-window.scss"],"names":[],"mappings":"AAAA;EACI;EACA;EACA,KACI;;AAIR;EACI;EACA;EACA,KACI;;AAIR;EACI;EACA;EACA,KACI;;AAIR;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGJ;EACI;;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGJ;EACI;EACA;EACA;;;AAGJ;EACI;EACA;EACA;EACA;;;AAGJ;EACI;;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA,kBAEI;EA0BJ,iBAEI;EAQJ;EACA;EACA;EACA;EACA;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;EACA;;;AAGJ;EACI;;;AAGJ;EACI;EACA;;;AAGJ;EACI;EACA;;;AAGJ;EACI;EACA;;;AAGJ;EACI;EACA;;;AAGJ;EACI;EACA;;;AAGJ;EACI;EACA;;;AAGJ;EACI;EACA;;;AAGJ;EACI;EACA;;;AAGJ;EACI;EACA;EACA;EACA;;;AAGJ;EACI;EACA;;;AAGJ;EACI;;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA,kBAEI;EAmDJ,iBAEI;EAWJ,qBAEI;EAOJ;;;AAGJ;EACI;;;AAIJ;EACI;;;AAGJ;EACI;EACA;EACA;;;AC3UJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;EACA;;;AAGJ;EACI;;;AChBJ;EACI;EACA;AACA;EACA;EACA;EACA;EACA;AACA;AAA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;EACA;EACA;EACA;EACA;EACA;;;AAGJ;AAAA;AAAA;EAGI;EACA;EACA;EACA;;;AAGJ;EACI;EACA;;;AAGJ;EACI;EACA;EACA;;;AAGJ;EACI;EACA;EACA;;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;;;ACnKJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;;;AAGJ;EACI;EACA;;;AAGJ;EACI;EACA;EACA;;;AAGJ;EACI;EACA;EACA;EACA;;;AAGJ;AAAA;EAEI;EACA;;;AAGJ;EACI;EACA;;;AAGJ;EACI;EACA;EACA;EACA;EACA,YACI;;;AAWR;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGJ;EACI;EACA;;;AAGJ;AAAA;EAEI;EACA;EACA;;;AAGJ;EACI;EACA;;;AAGJ;EACI;EACA;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;EACA;;AAEA;EAEI;EACA;EACA;EACA;EACA;EACA;;AAGJ;EACI;;;AAIR;AAAA;EAEI;EACA;;;AAGJ;EACI;;;AAGJ;AAAA;EAEI;;;AAGJ;EACI;EACA;EACA;;;AAGJ;EACI;EACA;EACA;EACA;EACA;;;AAGJ;EACI;EACA;EACA;;AAEA;EACI;;;AAIR;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;EACA;;;AAGJ;EACI;EACA;EACA;EACA","file":"ueb-style.css"}
|
||||
2
dist/css/ueb-style.min.css
vendored
2
dist/css/ueb-style.min.css
vendored
File diff suppressed because one or more lines are too long
2
dist/css/ueb-style.min.css.map
vendored
2
dist/css/ueb-style.min.css.map
vendored
@@ -1 +1 @@
|
||||
{"version":3,"sourceRoot":"","sources":["../../scss/style.scss","../../scss/ueb-knot.scss","../../scss/ueb-link.scss","../../scss/ueb-node.scss","../../scss/ueb-pin.scss","../../scss/ueb-ui-controls.scss","../../scss/ueb-window.scss"],"names":[],"mappings":"AAAA,WACI,qBACA,oBACA,IACI,kGAIR,WACI,qBACA,mBACA,IACI,sGAIR,WACI,qBACA,iBACA,IACI,gGAIR,cACI,eACA,6CACA,cACA,kBACA,8EACA,+BACA,WACA,iBAGJ,kBACI,iBAGJ,qBACI,aACA,kBACA,MACA,QACA,OACA,aACA,0BACA,UAGJ,mBACI,iBACA,iCACA,eAGJ,mBACI,kBACA,gCACA,gBACA,kBAGJ,oDACI,gBAGJ,UACI,kFACA,kBACA,eACA,gBACA,+DACA,gEACA,yBACA,iBAEI,s3BA0BJ,gBAEI,sZAQJ,sFACA,gEACA,oDACA,qBACA,gBAGJ,6CACI,gBAGJ,8CACI,eAGJ,6BACI,eAGJ,6BACI,mBAGJ,6BACI,kBAGJ,6BACI,mBAGJ,6BACI,iBAGJ,6BACI,mBAGJ,6BACI,kBAGJ,8BACI,mBAGJ,8BACI,kBAGJ,8BACI,mBAGJ,8BACI,iBACA,uDAGJ,0BACI,gCAGJ,8BACI,mBACA,uDAGJ,8BACI,sBACA,uDAGJ,8BACI,iBACA,uDAGJ,8BACI,sBACA,uDAGJ,8BACI,sBACA,uDAGJ,+BACI,iBACA,uDAGJ,+BACI,sBACA,uDAGJ,+BACI,sBACA,uDAGJ,kBACI,kBACA,QACA,SACA,wGAGJ,sBACI,QACA,SAGJ,yEACI,kBAGJ,aACI,cACA,kBACA,kBACA,MACA,OACA,QACA,SACA,iBAEI,wlDAmDJ,gBAEI,gQAWJ,oBAEI,wJAOJ,4BAGJ,gDACI,mBAIJ,eACI,mBAGJ,0BACI,mBACA,uBACA,gBC3UJ,yDACI,gBAGJ,iEACI,aAGJ,uFACI,aAGJ,0EACI,iBACA,2BAGJ,8FACI,qCChBJ,SACI,iDACA,kEAEA,wEACA,cACA,6CACA,8CAKA,kBAIJ,aACI,oEACA,kBAC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7PJ,cACI,6BAGJ,QACI,4NAMA,+CAGJ,QACI,cACA,gBAGJ,sBACI,kBAGJ,wEACI,aAGJ,iBACI,qBACA,iBACA,gBAEA,mBACI,qBACA,sBAIR,iFACI,qCACA,iBAGJ,oCACI,2BAGJ,0BACI,iBAGJ,cACI,eACA,gBAGJ,+BACI,iBAGJ,gCACI,gBAGJ,kBACI,WACA,YACA,2BAGJ,0CACI,uBACA,WACA,YACA,sBAGJ,0CACI,kBAGJ,cACI,qBAGJ,8BACI,kBAGJ,gHACI,aAGJ,uBACI,iBAGJ,eACI,qBACA,sBACA,gBACA,yBACA,kBACA,oBACA,cAEA,4FAII,yCACA,aAIR,yCACI,aAGJ,uCACI,gBACA,UACA,YACA,WACA,yBACA,2BAGJ,+CACI,6OAGJ,oEACI,UACA,WACA,YACA,qBACA,gBACA,yCAGJ,oCACI,cAGJ,qBACI,sBACA,gBACA,WAGJ,uBACI,cACA,aACA,YACA,UACA,eACA,gBACA,gBACA,4BACA,gBACA,cACA,YACA,cAEA,0CACI,WACA,YAGJ,gDACI,mBACA,mBACA,WC7KR,YACI,eACA,yBACA,kBACA,iBACA,mBACA,kBACA,eAEA,kBACI,mBAIR,aACI,aACA,yBACA,SACA,gBAGJ,mCACI,kBACA,oBAEA,qFAEI,WACA,cACA,kBACA,QACA,SACA,+BAGJ,2CACI,UACA,0BAGJ,0CACI,WACA,2BAIR,uCAEI,kBACA,yBACA,kBACA,mBAGJ,uBACI,kBACA,YAEA,6BACI,iBAIR,kCACI,iBAGJ,qCACI,cACA,kBACA,YACA,kBACA,mBAGJ,4BACI,kBACA,cACA,iBACA,UAKA,4BACI,WACA,qBACA,6BACA,oCACA,qCACA,sBAGJ,0BACI,eC5FR,WACI,cACA,kBACA,yBACA,MACA,OACA,sGACA,mBACA,6CACA,aAGJ,gBACI,aACA,mBACA,mBACA,gBACA,YACA,mBAGJ,oBACI,aACA,yBAGJ,iBACI,YACA,kBACA,kBAGJ,kBACI,YACA,YACA,WACA,eAGJ,+CAEI,qBACA,sBAGJ,uBACI,aACA,2DAGJ,wBACI,kBACA,iBACA,gBACA,mBACA,WACI,mLAWR,kBACI,cACA,kBACA,gBACA,iBACA,UACA,WACA,sBACA,kBAGJ,0CACI,8BACA,6BAGJ,qDAEI,aACA,oBACA,WAGJ,6BACI,iBACA,4EAGJ,wBACI,kBACA,4EAGJ,cACI,cAGJ,2CACI,yCAGJ,sCACI,yCAGJ,0BACI,kBACA,sBAEA,mEAEI,WACA,cACA,kBACA,oBACA,UACA,0BAGJ,iCACI,QAIR,4DAEI,YACA,YAGJ,8BACI,aAGJ,wDAEI,UAGJ,2BACI,aACA,gBACA,gBAGJ,oDACI,aACA,sBACA,8BACA,YACA,UAGJ,wDACI,aACA,mBACA,kBAEA,4DACI,YAIR,kDACI,YAGJ,yDACI,oCAGJ,yDACI,oCAGJ,yDACI,oCAGJ,yDACI,oCAGJ,yDACI,oCAGJ,yDACI,oCAGJ,yDACI,oCAGJ,2BACI,WAGJ,mBACI,oBAGJ,yBACI,iBACA,aAGJ,0CACI,UACA,iBACA,sBACA","file":"ueb-style.min.css"}
|
||||
{"version":3,"sourceRoot":"","sources":["../../scss/style.scss","../../scss/ueb-knot.scss","../../scss/ueb-link.scss","../../scss/ueb-node.scss","../../scss/ueb-pin.scss","../../scss/ueb-ui-controls.scss","../../scss/ueb-window.scss"],"names":[],"mappings":"AAAA,WACI,qBACA,oBACA,IACI,kGAIR,WACI,qBACA,mBACA,IACI,sGAIR,WACI,qBACA,iBACA,IACI,gGAIR,cACI,eACA,6CACA,cACA,kBACA,8EACA,+BACA,WACA,iBAGJ,kBACI,iBAGJ,qBACI,aACA,kBACA,MACA,QACA,OACA,aACA,0BACA,UAGJ,mBACI,iBACA,iCACA,eAGJ,mBACI,kBACA,gCACA,gBACA,kBAGJ,oDACI,gBAGJ,UACI,kFACA,kBACA,eACA,gBACA,+DACA,gEACA,yBACA,iBAEI,s3BA0BJ,gBAEI,sZAQJ,sFACA,gEACA,oDACA,qBACA,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,2BAGJ,+CACI,6OAGJ,oEACI,UACA,WACA,YACA,qBACA,gBACA,yCAGJ,oCACI,cAGJ,qBACI,sBACA,gBACA,WAGJ,uBACI,cACA,aACA,YACA,UACA,eACA,gBACA,gBACA,4BACA,gBACA,cACA,cAEA,0CACI,WACA,YAGJ,gDACI,mBACA,mBACA,WAIR,4EACI,YCjLJ,YACI,eACA,yBACA,kBACA,iBACA,mBACA,kBACA,eAEA,kBACI,mBAIR,aACI,aACA,yBACA,SACA,gBAGJ,mCACI,kBACA,oBAEA,qFAEI,WACA,cACA,kBACA,QACA,SACA,+BAGJ,2CACI,UACA,0BAGJ,0CACI,WACA,2BAIR,uCAEI,kBACA,yBACA,kBACA,mBAGJ,uBACI,kBACA,YAEA,6BACI,iBAIR,kCACI,iBAGJ,qCACI,cACA,kBACA,YACA,kBACA,mBAGJ,4BACI,kBACA,cACA,iBACA,UAKA,4BACI,WACA,qBACA,6BACA,oCACA,qCACA,sBAGJ,0BACI,eAIR,uEAGI,kBACA,MACA,YAGJ,oBACI,QACA,OACA,iBAGJ,0BACI,QACA,WACA,mBAGJ,yBACI,OACA,WACA,mBAGJ,sBACI,kBACA,MACA,QACA,SACA,WACA,iBAGJ,gFAGI,kBACA,YACA,YACA,iBAGJ,uBACI,QACA,OAGJ,6BACI,QACA,WACA,mBAGJ,4BACI,OACA,WACA,mBAGJ,qBACI,kBACA,MACA,SACA,OACA,WACA,iBCnKJ,WACI,cACA,kBACA,yBACA,MACA,OACA,sGACA,mBACA,6CACA,aAGJ,gBACI,aACA,mBACA,mBACA,gBACA,YACA,mBAGJ,oBACI,aACA,yBAGJ,iBACI,YACA,kBACA,kBAGJ,kBACI,YACA,YACA,WACA,eAGJ,+CAEI,qBACA,sBAGJ,uBACI,aACA,2DAGJ,wBACI,kBACA,iBACA,gBACA,mBACA,WACI,mLAWR,kBACI,cACA,kBACA,gBACA,iBACA,UACA,WACA,sBACA,kBAGJ,0CACI,8BACA,6BAGJ,qDAEI,aACA,oBACA,WAGJ,6BACI,iBACA,4EAGJ,wBACI,kBACA,4EAGJ,cACI,cAGJ,2CACI,yCAGJ,sCACI,yCAGJ,0BACI,kBACA,sBAEA,mEAEI,WACA,cACA,kBACA,oBACA,UACA,0BAGJ,iCACI,QAIR,4DAEI,YACA,YAGJ,8BACI,aAGJ,wDAEI,UAGJ,2BACI,aACA,gBACA,gBAGJ,oDACI,aACA,sBACA,8BACA,YACA,UAGJ,wDACI,aACA,mBACA,kBAEA,4DACI,YAIR,kDACI,YAGJ,yDACI,oCAGJ,yDACI,oCAGJ,yDACI,oCAGJ,yDACI,oCAGJ,yDACI,oCAGJ,yDACI,oCAGJ,yDACI,oCAGJ,2BACI,WAGJ,mBACI,oBAGJ,yBACI,iBACA,aAGJ,0CACI,UACA,iBACA,sBACA","file":"ueb-style.min.css"}
|
||||
1013
dist/ueblueprint.js
vendored
1013
dist/ueblueprint.js
vendored
File diff suppressed because it is too large
Load Diff
8
dist/ueblueprint.min.js
vendored
8
dist/ueblueprint.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -24,6 +24,14 @@ export default class IDraggableElement extends IElement {
|
||||
type: Number,
|
||||
attribute: false,
|
||||
},
|
||||
sizeX: {
|
||||
type: Number,
|
||||
attribute: false,
|
||||
},
|
||||
sizeY: {
|
||||
type: Number,
|
||||
attribute: false,
|
||||
},
|
||||
}
|
||||
static dragEventName = Configuration.dragEventName
|
||||
static dragGeneralEventName = Configuration.dragGeneralEventName
|
||||
@@ -36,6 +44,16 @@ export default class IDraggableElement extends IElement {
|
||||
super(entity, template)
|
||||
this.locationX = 0
|
||||
this.locationY = 0
|
||||
this.sizeX = -1
|
||||
this.sizeY = -1
|
||||
}
|
||||
|
||||
/** @param {Map} changedProperties */
|
||||
firstUpdated(changedProperties) {
|
||||
super.firstUpdated(changedProperties)
|
||||
const boundaries = this.getBoundingClientRect()
|
||||
this.sizeX = boundaries.width
|
||||
this.sizeY = boundaries.height
|
||||
}
|
||||
|
||||
/** @param {Number[]} param0 */
|
||||
@@ -80,4 +98,20 @@ export default class IDraggableElement extends IElement {
|
||||
this.setLocation(snappedLocation)
|
||||
}
|
||||
}
|
||||
|
||||
topBoundary() {
|
||||
return this.locationY
|
||||
}
|
||||
|
||||
rightBoundary() {
|
||||
return this.locationX + this.sizeX
|
||||
}
|
||||
|
||||
bottomBoundary() {
|
||||
return this.locationY + this.sizeY
|
||||
}
|
||||
|
||||
leftBoundary() {
|
||||
return this.locationX
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import CommentNodeTemplate from "../template/CommentNodeTemplate"
|
||||
import Configuration from "../Configuration"
|
||||
import IdentifierEntity from "../entity/IdentifierEntity"
|
||||
import ISelectableDraggableElement from "./ISelectableDraggableElement"
|
||||
@@ -9,7 +10,6 @@ import PinReferenceEntity from "../entity/PinReferenceEntity"
|
||||
import SerializerFactory from "../serialization/SerializerFactory"
|
||||
import Utility from "../Utility"
|
||||
import VariableAccessNodeTemplate from "../template/VariableAccessNodeTemplate"
|
||||
import CommentNodeTemplate from "../template/CommentNodeTemplate"
|
||||
|
||||
/** @typedef {import("./IElement").default} IElement */
|
||||
|
||||
@@ -96,6 +96,12 @@ export default class NodeElement extends ISelectableDraggableElement {
|
||||
super.setLocation([this.entity.NodePosX.value, this.entity.NodePosY.value])
|
||||
this.entity.subscribe("AdvancedPinDisplay", value => this.advancedPinDisplay = value)
|
||||
this.entity.subscribe("Name", value => this.nodeName = value)
|
||||
if (this.entity.NodeWidth) {
|
||||
this.sizeX = this.entity.NodeWidth
|
||||
}
|
||||
if (this.entity.NodeHeight) {
|
||||
this.sizeY = this.entity.NodeHeight
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -184,7 +184,11 @@ export default class LinearColorEntity extends IEntity {
|
||||
}
|
||||
|
||||
toNumber() {
|
||||
return (this.R.value << 24) + (this.G.value << 16) + (this.B.value << 8) + this.A.value
|
||||
return (
|
||||
Math.round(this.R.value * 0xff) << 24)
|
||||
+ (Math.round(this.G.value * 0xff) << 16)
|
||||
+ (Math.round(this.B.value * 0xff) << 8)
|
||||
+ Math.round(this.A.value * 0xff)
|
||||
}
|
||||
|
||||
/** @param {Number} number */
|
||||
|
||||
@@ -62,7 +62,7 @@ export default class IMouseClickDrag extends IPointing {
|
||||
this.#trackingMouse = this.target.dispatchEvent(dragEvent) == false
|
||||
const location = this.locationFromEvent(e)
|
||||
// Do actual actions
|
||||
this.mouseLocation = Utility.snapToGrid(this.clickedPosition, this.stepSize)
|
||||
this.lastLocation = Utility.snapToGrid(this.clickedPosition, this.stepSize)
|
||||
this.startDrag(location)
|
||||
this.started = true
|
||||
}
|
||||
@@ -111,15 +111,14 @@ export default class IMouseClickDrag extends IPointing {
|
||||
|
||||
clickedOffset = [0, 0]
|
||||
clickedPosition = [0, 0]
|
||||
mouseLocation = [0, 0]
|
||||
lastLocation = [0, 0]
|
||||
started = false
|
||||
stepSize = 1
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {T} target
|
||||
* @param {Blueprint} blueprint
|
||||
* @param {Object} options
|
||||
* @param {T} target
|
||||
* @param {Blueprint} blueprint
|
||||
* @param {Object} options
|
||||
*/
|
||||
constructor(target, blueprint, options = {}) {
|
||||
options.clickButton ??= 0
|
||||
@@ -133,12 +132,13 @@ export default class IMouseClickDrag extends IPointing {
|
||||
super(target, blueprint, options)
|
||||
this.stepSize = parseInt(options?.stepSize ?? Configuration.gridSize)
|
||||
this.#movementListenedElement = this.options.moveEverywhere ? document.documentElement : this.movementSpace
|
||||
this.#draggableElement = this.options.draggableElement
|
||||
this.#draggableElement = /** @type {HTMLElement} */(this.options.draggableElement)
|
||||
|
||||
this.listenEvents()
|
||||
}
|
||||
|
||||
listenEvents() {
|
||||
super.listenEvents()
|
||||
this.#draggableElement.addEventListener("mousedown", this.#mouseDownHandler)
|
||||
if (this.options.clickButton == 2) {
|
||||
this.#draggableElement.addEventListener("contextmenu", e => e.preventDefault())
|
||||
@@ -146,6 +146,7 @@ export default class IMouseClickDrag extends IPointing {
|
||||
}
|
||||
|
||||
unlistenEvents() {
|
||||
super.unlistenEvents()
|
||||
this.#draggableElement.removeEventListener("mousedown", this.#mouseDownHandler)
|
||||
}
|
||||
|
||||
|
||||
51
js/input/mouse/MouseClickDrag.js
Executable file
51
js/input/mouse/MouseClickDrag.js
Executable file
@@ -0,0 +1,51 @@
|
||||
import MouseMoveDraggable from "./MouseMoveDraggable"
|
||||
|
||||
/** @typedef {import("../../Blueprint").default} Blueprint */
|
||||
|
||||
export default class MouseClickDrag extends MouseMoveDraggable {
|
||||
|
||||
#onClicked
|
||||
#onStartDrag
|
||||
#onDrag
|
||||
#onEndDrag
|
||||
|
||||
/**
|
||||
* @param {HTMLElement} target
|
||||
* @param {Blueprint} blueprint
|
||||
* @param {Object} options
|
||||
*/
|
||||
constructor(target, blueprint, options = {}) {
|
||||
super(target, blueprint, options)
|
||||
if (options.onClicked) {
|
||||
this.#onClicked = options.onClicked
|
||||
}
|
||||
if (options.onStartDrag) {
|
||||
this.#onStartDrag = options.onStartDrag
|
||||
}
|
||||
if (options.onDrag) {
|
||||
this.#onDrag = options.onDrag
|
||||
}
|
||||
if (options.onEndDrag) {
|
||||
this.#onEndDrag = options.onEndDrag
|
||||
}
|
||||
}
|
||||
|
||||
clicked() {
|
||||
super.clicked()
|
||||
this.#onClicked?.()
|
||||
}
|
||||
|
||||
startDrag() {
|
||||
super.startDrag()
|
||||
this.#onStartDrag?.()
|
||||
}
|
||||
|
||||
dragAction(location, movement) {
|
||||
this.#onDrag?.(location, movement)
|
||||
}
|
||||
|
||||
endDrag() {
|
||||
super.endDrag()
|
||||
this.#onEndDrag?.()
|
||||
}
|
||||
}
|
||||
@@ -23,29 +23,32 @@ export default class MouseMoveDraggable extends IMouseClickDrag {
|
||||
}
|
||||
|
||||
dragTo(location, offset) {
|
||||
const targetLocation = [this.target.locationX, this.target.locationY]
|
||||
const targetLocation = [
|
||||
this.target.locationX ?? this.lastLocation[0],
|
||||
this.target.locationY ?? this.lastLocation[1],
|
||||
]
|
||||
const [adjustedLocation, adjustedTargetLocation] = this.stepSize > 1
|
||||
? [Utility.snapToGrid(location, this.stepSize), Utility.snapToGrid(targetLocation, this.stepSize)]
|
||||
: [location, targetLocation]
|
||||
offset = [
|
||||
adjustedLocation[0] - this.mouseLocation[0],
|
||||
adjustedLocation[1] - this.mouseLocation[1]
|
||||
adjustedLocation[0] - this.lastLocation[0],
|
||||
adjustedLocation[1] - this.lastLocation[1],
|
||||
]
|
||||
if (offset[0] == 0 && offset[1] == 0) {
|
||||
return
|
||||
}
|
||||
// Make sure it snaps on the grid
|
||||
offset[0] += adjustedTargetLocation[0] - this.target.locationX
|
||||
offset[1] += adjustedTargetLocation[1] - this.target.locationY
|
||||
offset[0] += adjustedTargetLocation[0] - targetLocation[0]
|
||||
offset[1] += adjustedTargetLocation[1] - targetLocation[1]
|
||||
this.dragAction(adjustedLocation, offset)
|
||||
// Reassign the position of mouse
|
||||
this.mouseLocation = adjustedLocation
|
||||
this.lastLocation = adjustedLocation
|
||||
}
|
||||
|
||||
dragAction(location, offset) {
|
||||
this.target.setLocation([
|
||||
location[0] - this.clickedOffset[0],
|
||||
location[1] - this.clickedOffset[1]
|
||||
location[1] - this.clickedOffset[1],
|
||||
])
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
import { css, html } from "lit"
|
||||
import Configuration from "../Configuration"
|
||||
import IResizeableTemplate from "./IResizeableTemplate"
|
||||
import LinearColorEntity from "../entity/LinearColorEntity"
|
||||
import NodeTemplate from "./NodeTemplate"
|
||||
|
||||
/**
|
||||
* @typedef {import("../element/NodeElement").default} NodeElement
|
||||
* @typedef {import("../element/PinElement").default} PinElement
|
||||
*/
|
||||
|
||||
export default class CommentNodeTemplate extends NodeTemplate {
|
||||
export default class CommentNodeTemplate extends IResizeableTemplate {
|
||||
|
||||
#color = LinearColorEntity.getWhite()
|
||||
|
||||
@@ -19,12 +20,12 @@ export default class CommentNodeTemplate extends NodeTemplate {
|
||||
// Dimming the colors to 2/3
|
||||
const factor = 2 / 3
|
||||
this.#color.setFromRGBA(
|
||||
this.#color.R.value * factor,
|
||||
this.#color.G.value * factor,
|
||||
this.#color.B.value * factor,
|
||||
this.#color.R.value,
|
||||
this.#color.G.value,
|
||||
this.#color.B.value,
|
||||
)
|
||||
element.classList.add("ueb-node-style-comment", "ueb-node-resizeable")
|
||||
super.constructed(element) // Keep it at the end
|
||||
super.constructed(element) // Keep it at the end because it calls this.getColor() where this.#color must be initialized
|
||||
}
|
||||
|
||||
getColor() {
|
||||
@@ -36,25 +37,32 @@ export default class CommentNodeTemplate extends NodeTemplate {
|
||||
}
|
||||
|
||||
render() {
|
||||
const width = this.element.entity.getNodeWidth()
|
||||
const height = this.element.entity.getNodeHeight()
|
||||
return html`
|
||||
<div class="ueb-node-border">
|
||||
<div class="ueb-node-handler-top"></div>
|
||||
<div class="ueb-node-handler-right"></div>
|
||||
<div class="ueb-node-handler-bottom"></div>
|
||||
<div class="ueb-node-handler-left"></div>
|
||||
<div class="ueb-node-wrapper">
|
||||
<div class="ueb-node-top">
|
||||
${this.element.entity.NodeComment}
|
||||
</div>
|
||||
<div class="ueb-node-content"
|
||||
style="${`width: ${width}px; height: ${height}px;`}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`
|
||||
}
|
||||
|
||||
/** @param {Number} value */
|
||||
setSizeX(value) {
|
||||
if (value >= Configuration.gridSet * Configuration.gridSize) {
|
||||
this.element.sizeX = value
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
/** @param {Number} value */
|
||||
setSizeY(value) {
|
||||
if (value >= 3 * Configuration.gridSize) {
|
||||
this.element.sizeY = Math.max(value, 3 * Configuration.gridSize)
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
142
js/template/IResizeableTemplate.js
Normal file
142
js/template/IResizeableTemplate.js
Normal file
@@ -0,0 +1,142 @@
|
||||
import MouseClickDrag from "../input/mouse/MouseClickDrag"
|
||||
import NodeTemplate from "./NodeTemplate"
|
||||
|
||||
/** @typedef {import("../element/NodeElement").default} NodeElement */
|
||||
|
||||
export default class IResizeableTemplate extends NodeTemplate {
|
||||
|
||||
#THandler = document.createElement("div")
|
||||
#RHandler = document.createElement("div")
|
||||
#BHandler = document.createElement("div")
|
||||
#LHandler = document.createElement("div")
|
||||
#TRHandler = document.createElement("div")
|
||||
#BRHandler = document.createElement("div")
|
||||
#BLHandler = document.createElement("div")
|
||||
#TLHandler = document.createElement("div")
|
||||
|
||||
/** @param {NodeElement} element */
|
||||
constructed(element) {
|
||||
super.constructed(element)
|
||||
this.element.classList.add("ueb-resizeable")
|
||||
}
|
||||
|
||||
/** @param {Map} changedProperties */
|
||||
update(changedProperties) {
|
||||
super.update(changedProperties)
|
||||
if (this.element.sizeX >= 0 && changedProperties.has("sizeX")) {
|
||||
this.element.style.width = `${this.element.sizeX}px`
|
||||
}
|
||||
if (this.element.sizeY >= 0 && changedProperties.has("sizeY")) {
|
||||
this.element.style.height = `${this.element.sizeY}px`
|
||||
}
|
||||
}
|
||||
|
||||
/** @param {Map} changedProperties */
|
||||
firstUpdated(changedProperties) {
|
||||
super.firstUpdated(changedProperties)
|
||||
this.#THandler.classList.add("ueb-resizeable-top")
|
||||
this.#RHandler.classList.add("ueb-resizeable-right")
|
||||
this.#BHandler.classList.add("ueb-resizeable-bottom")
|
||||
this.#LHandler.classList.add("ueb-resizeable-left")
|
||||
this.#TRHandler.classList.add("ueb-resizeable-top-right")
|
||||
this.#BRHandler.classList.add("ueb-resizeable-bottom-right")
|
||||
this.#BLHandler.classList.add("ueb-resizeable-bottom-left")
|
||||
this.#TLHandler.classList.add("ueb-resizeable-top-left")
|
||||
this.element.append(
|
||||
this.#THandler,
|
||||
this.#RHandler,
|
||||
this.#BHandler,
|
||||
this.#LHandler,
|
||||
this.#TRHandler,
|
||||
this.#BRHandler,
|
||||
this.#BLHandler,
|
||||
this.#TLHandler
|
||||
)
|
||||
}
|
||||
|
||||
createInputObjects() {
|
||||
return [
|
||||
...super.createInputObjects(),
|
||||
new MouseClickDrag(this.#THandler, this.element.blueprint, {
|
||||
onDrag: (location, movement) => {
|
||||
movement[1] = location[1] - this.element.topBoundary()
|
||||
if (this.setSizeY(this.element.sizeY - movement[1])) {
|
||||
this.element.addLocation([0, movement[1]])
|
||||
}
|
||||
}
|
||||
}),
|
||||
new MouseClickDrag(this.#RHandler, this.element.blueprint, {
|
||||
onDrag: (location, movement) => {
|
||||
movement[0] = location[0] - this.element.rightBoundary()
|
||||
this.setSizeX(this.element.sizeX + movement[0])
|
||||
}
|
||||
}),
|
||||
new MouseClickDrag(this.#BHandler, this.element.blueprint, {
|
||||
onDrag: (location, movement) => {
|
||||
movement[1] = location[1] - this.element.bottomBoundary()
|
||||
this.setSizeY(this.element.sizeY + movement[1])
|
||||
}
|
||||
}),
|
||||
new MouseClickDrag(this.#LHandler, this.element.blueprint, {
|
||||
onDrag: (location, movement) => {
|
||||
movement[0] = location[0] - this.element.leftBoundary()
|
||||
if (this.setSizeX(this.element.sizeX - movement[0])) {
|
||||
this.element.addLocation([movement[0], 0])
|
||||
}
|
||||
}
|
||||
}),
|
||||
new MouseClickDrag(this.#TRHandler, this.element.blueprint, {
|
||||
onDrag: (location, movement) => {
|
||||
movement[0] = location[0] - this.element.rightBoundary()
|
||||
movement[1] = location[1] - this.element.topBoundary()
|
||||
this.setSizeX(this.element.sizeX + movement[0])
|
||||
if (this.setSizeY(this.element.sizeY - movement[1])) {
|
||||
this.element.addLocation([0, movement[1]])
|
||||
}
|
||||
}
|
||||
}),
|
||||
new MouseClickDrag(this.#BRHandler, this.element.blueprint, {
|
||||
onDrag: (location, movement) => {
|
||||
movement[0] = location[0] - this.element.rightBoundary()
|
||||
movement[1] = location[1] - this.element.bottomBoundary()
|
||||
this.setSizeX(this.element.sizeX + movement[0])
|
||||
this.setSizeY(this.element.sizeY + movement[1])
|
||||
}
|
||||
}),
|
||||
new MouseClickDrag(this.#BLHandler, this.element.blueprint, {
|
||||
onDrag: (location, movement) => {
|
||||
movement[0] = location[0] - this.element.leftBoundary()
|
||||
movement[1] = location[1] - this.element.bottomBoundary()
|
||||
if (this.setSizeX(this.element.sizeX - movement[0])) {
|
||||
this.element.addLocation([movement[0], 0])
|
||||
}
|
||||
this.setSizeY(this.element.sizeY + movement[1])
|
||||
}
|
||||
}),
|
||||
new MouseClickDrag(this.#TLHandler, this.element.blueprint, {
|
||||
onDrag: (location, movement) => {
|
||||
movement[0] = location[0] - this.element.leftBoundary()
|
||||
movement[1] = location[1] - this.element.topBoundary()
|
||||
if (this.setSizeX(this.element.sizeX - movement[0])) {
|
||||
this.element.addLocation([movement[0], 0])
|
||||
}
|
||||
if (this.setSizeY(this.element.sizeY - movement[1])) {
|
||||
this.element.addLocation([0, movement[1]])
|
||||
}
|
||||
}
|
||||
}),
|
||||
]
|
||||
}
|
||||
|
||||
/** @param {Number} value */
|
||||
setSizeX(value) {
|
||||
this.element.sizeX = value
|
||||
return true
|
||||
}
|
||||
|
||||
/** @param {Number} value */
|
||||
setSizeY(value) {
|
||||
this.element.sizeY = value
|
||||
return true
|
||||
}
|
||||
}
|
||||
@@ -11,10 +11,6 @@ ueb-node {
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
ueb-blueprint[data-scrolling="false"][data-selecting="false"] ueb-node {
|
||||
cursor: move;
|
||||
}
|
||||
|
||||
.ueb-node-border {
|
||||
margin: -3px;
|
||||
padding: 3px;
|
||||
@@ -55,6 +51,10 @@ ueb-node[data-selected="true"]>.ueb-node-border {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
ueb-blueprint[data-scrolling="false"][data-selecting="false"] .ueb-node-wrapper {
|
||||
cursor: move;
|
||||
}
|
||||
|
||||
.ueb-zoom--2 .ueb-node-wrapper {
|
||||
box-shadow: none;
|
||||
padding: 0;
|
||||
@@ -219,13 +219,6 @@ ueb-node[data-selected="true"] .ueb-node-border {
|
||||
background: none;
|
||||
}
|
||||
|
||||
ueb-node.ueb-node-resizeable {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
ueb-node.ueb-node-resizeable .ueb-node-handler-top,
|
||||
.ueb-node-handler-bottom {}
|
||||
|
||||
ueb-node.ueb-node-style-glass .ueb-node-top,
|
||||
ueb-node.ueb-node-style-glass .ueb-node-name {
|
||||
margin: 0;
|
||||
@@ -244,10 +237,20 @@ ueb-node.ueb-node-style-glass .ueb-node-outputs:first-child {
|
||||
padding-left: 8px;
|
||||
}
|
||||
|
||||
ueb-node.ueb-node-style-comment {
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
ueb-node.ueb-node-style-comment .ueb-node-border {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
ueb-node.ueb-node-style-comment .ueb-node-wrapper {
|
||||
padding: 0;
|
||||
height: 100%;
|
||||
border-radius: 0;
|
||||
background: rgba(var(--ueb-node-color), 0.5);
|
||||
box-shadow: 0;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
ueb-node.ueb-node-style-comment .ueb-node-top {
|
||||
|
||||
@@ -160,7 +160,6 @@ ueb-pin[data-type="/Script/CoreUObject.LinearColor"] .ueb-pin-input {
|
||||
line-height: calc(1em + 1px);
|
||||
background: none;
|
||||
color: inherit;
|
||||
cursor: text;
|
||||
overflow: auto;
|
||||
|
||||
&::-webkit-scrollbar {
|
||||
@@ -174,3 +173,7 @@ ueb-pin[data-type="/Script/CoreUObject.LinearColor"] .ueb-pin-input {
|
||||
margin: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
ueb-blueprint[data-scrolling="false"][data-selecting="false"] .ueb-node-wrapper {
|
||||
cursor: move;
|
||||
}
|
||||
|
||||
@@ -95,3 +95,73 @@ ueb-window .ueb-pin-input-content {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
.ueb-resizeable-top,
|
||||
.ueb-resizeable-top-right,
|
||||
.ueb-resizeable-top-left {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
height: 10px;
|
||||
}
|
||||
|
||||
.ueb-resizeable-top {
|
||||
right: 0;
|
||||
left: 0;
|
||||
cursor: ns-resize;
|
||||
}
|
||||
|
||||
.ueb-resizeable-top-right {
|
||||
right: 0;
|
||||
width: 10px;
|
||||
cursor: nesw-resize;
|
||||
}
|
||||
|
||||
.ueb-resizeable-top-left {
|
||||
left: 0;
|
||||
width: 10px;
|
||||
cursor: nwse-resize;
|
||||
}
|
||||
|
||||
.ueb-resizeable-right {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
width: 10px;
|
||||
cursor: ew-resize;
|
||||
}
|
||||
|
||||
.ueb-resizeable-bottom,
|
||||
.ueb-resizeable-bottom-right,
|
||||
.ueb-resizeable-bottom-left {
|
||||
position: absolute;
|
||||
bottom: -3px;
|
||||
height: 10px;
|
||||
cursor: ns-resize;
|
||||
}
|
||||
|
||||
.ueb-resizeable-bottom {
|
||||
right: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.ueb-resizeable-bottom-right {
|
||||
right: 0;
|
||||
width: 10px;
|
||||
cursor: nwse-resize;
|
||||
}
|
||||
|
||||
.ueb-resizeable-bottom-left {
|
||||
left: 0;
|
||||
width: 10px;
|
||||
cursor: nesw-resize;
|
||||
}
|
||||
|
||||
.ueb-resizeable-left {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 10px;
|
||||
cursor: ew-resize;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user