mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-15 01:24:41 +08:00
Edge scroll, minor refactoring
This commit is contained in:
6
dist/css/ueb-style.css
vendored
6
dist/css/ueb-style.css
vendored
@@ -66,10 +66,6 @@ ueb-blueprint svg {
|
||||
scrollbar-width: 0;
|
||||
}
|
||||
|
||||
ueb-blueprint[data-focused=true] .ueb-viewport-body {
|
||||
overflow: scroll;
|
||||
}
|
||||
|
||||
.ueb-grid {
|
||||
--ueb-grid-line-actual-width: calc(var(--ueb-grid-line-width) / var(--ueb-scale));
|
||||
position: absolute;
|
||||
@@ -206,7 +202,7 @@ ueb-link > svg {
|
||||
ueb-link .ueb-link-area path {
|
||||
visibility: visible;
|
||||
stroke: var(--ueb-link-color);
|
||||
stroke-width: calc(3px / var(--ueb-scale));
|
||||
stroke-width: calc(2px / var(--ueb-scale));
|
||||
}
|
||||
|
||||
ueb-link[data-dragging=true] .ueb-link-area path,
|
||||
|
||||
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;;;AAGJ;EACI;IACI;;EAGJ;IACI;;;AAIR;EACI;;;AAGJ;EACI;EACA;EACA;EACA;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;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AGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EAII;EACA;;;AAIR;AAAA;EAEI;;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;;;AAGJ;EACI;;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;;;AAGJ;EACI;;;AAGJ;EACI;EACA;EACA;;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACI;EACA;;AAGJ;EACI;EACA;EACA;;AAGJ;EACI;;;AAIR;EACI;;;AC9MJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACI;;;AAIR;EACI;EACA;EACA;EACA;;;AAGJ;EACI;EACA;;AAEA;EAEI;EACA;EACA;EACA;EACA;EACA;;AAGJ;EACI;EACA;;AAGJ;EACI;EACA;;;AAIR;AAAA;EAEI;EACA;EACA;EACA;;;AAGJ;EACI;EACA;;AAEA;EACI;;;AAIR;EACI;;;AAGJ;EACI;EACA;EACA;EACA;EACA;;;AAGJ;EACI;EACA;EACA;EACA;;;AAKA;EACI;EACA;EACA;EACA;EACA;EACA;;AAGJ;EACI;;;AAIR;AAAA;AAAA;EAGI;EACA;EACA;;;AAGJ;EACI;EACA;EACA;;;AAGJ;EACI;EACA;EACA;;;AAGJ;EACI;EACA;EACA;;;AAGJ;EACI;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"}
|
||||
{"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;;;AAGJ;EACI;IACI;;EAGJ;IACI;;;AAIR;EACI;;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;;;AAGJ;EACI;EACA;EACA;EACA;;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA,kBAEI;EA0BJ,iBAEI;EAQJ;EACA;EACA;EACA;EACA;;;AAGJ;EACI;;;AAGJ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I;;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EAII;EACA;;;AAIR;AAAA;EAEI;;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;;;AAGJ;EACI;;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;;;AAGJ;EACI;;;AAGJ;EACI;EACA;EACA;;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACI;EACA;;AAGJ;EACI;EACA;EACA;;AAGJ;EACI;;;AAIR;EACI;;;AC9MJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACI;;;AAIR;EACI;EACA;EACA;EACA;;;AAGJ;EACI;EACA;;AAEA;EAEI;EACA;EACA;EACA;EACA;EACA;;AAGJ;EACI;EACA;;AAGJ;EACI;EACA;;;AAIR;AAAA;EAEI;EACA;EACA;EACA;;;AAGJ;EACI;EACA;;AAEA;EACI;;;AAIR;EACI;;;AAGJ;EACI;EACA;EACA;EACA;EACA;;;AAGJ;EACI;EACA;EACA;EACA;;;AAKA;EACI;EACA;EACA;EACA;EACA;EACA;;AAGJ;EACI;;;AAIR;AAAA;AAAA;EAGI;EACA;EACA;;;AAGJ;EACI;EACA;EACA;;;AAGJ;EACI;EACA;EACA;;;AAGJ;EACI;EACA;EACA;;;AAGJ;EACI;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,0BACA,UAGJ,8BACI,GACI,cAGJ,KACI,eAIR,qCACI,mCAGJ,mBACI,iBACA,YACA,cACA,eACA,iBACA,oBAGJ,mBAC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AGJ,+BACI,iBAGJ,gCACI,gBAGJ,+FAEI,cAGJ,kBACI,mBAGJ,sCACI,WACA,YACA,uBAGJ,0CACI,kBAGJ,cACI,qBACA,sBAGJ,8BACI,kBAGJ,gHACI,aAGJ,uBACI,iBAGJ,eACI,qBACA,sBACA,gBACA,yBACA,kBACA,oBACA,cAEA,4FAII,yCACA,aAIR,0FAEI,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,gBACA,cACA,cAEA,0CACI,WACA,YAGJ,gDACI,yBACA,mBACA,WAGJ,sDACI,mBAIR,uFACI,YC9MJ,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"}
|
||||
{"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,0BACA,UAGJ,8BACI,GACI,cAGJ,KACI,eAIR,qCACI,mCAGJ,mBACI,iBACA,YACA,cACA,eACA,iBACA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GJ,+BACI,iBAGJ,gCACI,gBAGJ,+FAEI,cAGJ,kBACI,mBAGJ,sCACI,WACA,YACA,uBAGJ,0CACI,kBAGJ,cACI,qBACA,sBAGJ,8BACI,kBAGJ,gHACI,aAGJ,uBACI,iBAGJ,eACI,qBACA,sBACA,gBACA,yBACA,kBACA,oBACA,cAEA,4FAII,yCACA,aAIR,0FAEI,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,gBACA,cACA,cAEA,0CACI,WACA,YAGJ,gDACI,yBACA,mBACA,WAGJ,sDACI,mBAIR,uFACI,YC9MJ,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"}
|
||||
100
dist/ueblueprint.js
vendored
100
dist/ueblueprint.js
vendored
@@ -48,6 +48,7 @@ class Configuration {
|
||||
static distanceThreshold = 5 // px
|
||||
static dragEventName = "ueb-drag"
|
||||
static dragGeneralEventName = "ueb-drag-general"
|
||||
static edgeScrollThreshold = 50
|
||||
static editTextEventName = {
|
||||
begin: "ueb-edit-text-begin",
|
||||
end: "ueb-edit-text-end",
|
||||
@@ -525,10 +526,10 @@ class Utility {
|
||||
*/
|
||||
static convertLocation(viewportLocation, movementElement, ignoreScale = false) {
|
||||
const scaleCorrection = ignoreScale ? 1 : 1 / Utility.getScale(movementElement);
|
||||
const targetOffset = movementElement.getBoundingClientRect();
|
||||
const bounding = movementElement.getBoundingClientRect();
|
||||
let location = [
|
||||
Math.round((viewportLocation[0] - targetOffset.x) * scaleCorrection),
|
||||
Math.round((viewportLocation[1] - targetOffset.y) * scaleCorrection)
|
||||
Math.round((viewportLocation[0] - bounding.x) * scaleCorrection),
|
||||
Math.round((viewportLocation[1] - bounding.y) * scaleCorrection)
|
||||
];
|
||||
return location
|
||||
}
|
||||
@@ -2904,7 +2905,7 @@ class ObjectEntity extends IEntity {
|
||||
if (this.getClass() === Configuration.nodeType.macro) {
|
||||
return Utility.formatStringName(this.MacroGraphReference.getMacroName())
|
||||
}
|
||||
let memberName = this.FunctionReference.MemberName;
|
||||
let memberName = this.FunctionReference?.MemberName;
|
||||
if (memberName) {
|
||||
const memberParent = this.FunctionReference.MemberParent?.path ?? "";
|
||||
switch (memberName) {
|
||||
@@ -4557,7 +4558,30 @@ class IMouseClickDrag extends IPointing {
|
||||
const movement = [e.movementX, e.movementY];
|
||||
this.dragTo(location, movement);
|
||||
if (this.#trackingMouse) {
|
||||
this.blueprint.mousePosition = this.locationFromEvent(e);
|
||||
this.blueprint.mousePosition = location;
|
||||
}
|
||||
if (this.options.scrollGraphEdge) {
|
||||
const movementNorm = Math.sqrt(movement[0] * movement[0] + movement[1] * movement[1]);
|
||||
const threshold = this.blueprint.scaleCorrect(Configuration.edgeScrollThreshold);
|
||||
const leftThreshold = this.blueprint.template.gridLeftVisibilityBoundary() + threshold;
|
||||
const rightThreshold = this.blueprint.template.gridRightVisibilityBoundary() - threshold;
|
||||
let scrollX = 0;
|
||||
if (location[0] < leftThreshold) {
|
||||
scrollX = location[0] - leftThreshold;
|
||||
} else if (location[0] > rightThreshold) {
|
||||
scrollX = location[0] - rightThreshold;
|
||||
}
|
||||
const topThreshold = this.blueprint.template.gridTopVisibilityBoundary() + threshold;
|
||||
const bottomThreshold = this.blueprint.template.gridBottomVisibilityBoundary() - threshold;
|
||||
let scrollY = 0;
|
||||
if (location[1] < topThreshold) {
|
||||
scrollY = location[1] - topThreshold;
|
||||
} else if (location[1] > bottomThreshold) {
|
||||
scrollY = location[1] - bottomThreshold;
|
||||
}
|
||||
scrollX = Utility.clamp(this.blueprint.scaleCorrectReverse(scrollX) ** 3 * movementNorm * 0.6, -20, 20);
|
||||
scrollY = Utility.clamp(this.blueprint.scaleCorrectReverse(scrollY) ** 3 * movementNorm * 0.6, -20, 20);
|
||||
this.blueprint.scrollDelta(scrollX, scrollY);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4607,6 +4631,7 @@ class IMouseClickDrag extends IPointing {
|
||||
options.moveEverywhere ??= false;
|
||||
options.movementSpace ??= blueprint?.getGridDOMElement();
|
||||
options.repositionOnClick ??= false;
|
||||
options.scrollGraphEdge ??= false;
|
||||
options.strictTarget ??= false;
|
||||
super(target, blueprint, options);
|
||||
this.stepSize = parseInt(options?.stepSize ?? Configuration.gridSize);
|
||||
@@ -4815,7 +4840,8 @@ class Paste extends IInput {
|
||||
|
||||
class Select extends IMouseClickDrag {
|
||||
|
||||
constructor(target, blueprint, options) {
|
||||
constructor(target, blueprint, options = {}) {
|
||||
options.scrollGraphEdge ??= true;
|
||||
super(target, blueprint, options);
|
||||
this.selectorElement = this.blueprint.template.selectorElement;
|
||||
}
|
||||
@@ -6032,6 +6058,7 @@ class ISelectableDraggableTemplate extends IDraggablePositionedTemplate {
|
||||
createDraggableObject() {
|
||||
return /** @type {MouseMoveDraggable} */(new MouseMoveNodes(this.element, this.blueprint, {
|
||||
draggableElement: this.getDraggableElement(),
|
||||
scrollGraphEdge: true,
|
||||
}))
|
||||
}
|
||||
|
||||
@@ -6454,6 +6481,7 @@ class CommentNodeTemplate extends IResizeableTemplate {
|
||||
}
|
||||
|
||||
/**
|
||||
* @typedef {import("../../Blueprint").default} Blueprint
|
||||
* @typedef {import("../../element/LinkElement").default} LinkElement
|
||||
* @typedef {import("../../element/LinkElement").LinkElementConstructor} LinkElementConstructor
|
||||
* @typedef {import("../../element/PinElement").default} PinElement
|
||||
@@ -6519,6 +6547,16 @@ class MouseCreateLink extends IMouseClickDrag {
|
||||
|
||||
linkValid = false
|
||||
|
||||
/**
|
||||
* @param {PinElement} target
|
||||
* @param {Blueprint} blueprint
|
||||
* @param {Object} options
|
||||
*/
|
||||
constructor(target, blueprint, options = {}) {
|
||||
options.scrollGraphEdge ??= true;
|
||||
super(target, blueprint, options);
|
||||
}
|
||||
|
||||
startDrag(location) {
|
||||
if (this.target.nodeElement.getType() == Configuration.nodeType.knot) {
|
||||
this.#knotPin = this.target;
|
||||
@@ -7356,6 +7394,13 @@ class Blueprint extends IElement {
|
||||
reflect: true,
|
||||
converter: Utility.booleanConverter,
|
||||
},
|
||||
resting: {
|
||||
type: Boolean,
|
||||
attribute: "data-resting",
|
||||
reflect: true,
|
||||
converter: Utility.booleanConverter,
|
||||
noAccessor: true,
|
||||
},
|
||||
focused: {
|
||||
type: Boolean,
|
||||
attribute: "data-focused",
|
||||
@@ -7407,7 +7452,6 @@ class Blueprint extends IElement {
|
||||
node.setSelected(selected);
|
||||
}
|
||||
|
||||
#avoidScrolling = false
|
||||
/** @type {Map<String, Number>} */
|
||||
#nodeNameCounter = new Map()
|
||||
/** @type {NodeElement[]}" */
|
||||
@@ -7418,6 +7462,12 @@ class Blueprint extends IElement {
|
||||
mousePosition = [0, 0]
|
||||
waitingExpandUpdate = false
|
||||
|
||||
get resting() {
|
||||
return !this.selecting && !this.scrolling
|
||||
}
|
||||
set resting(value) {
|
||||
}
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
this.selecting = false;
|
||||
@@ -7452,14 +7502,14 @@ class Blueprint extends IElement {
|
||||
this.scrollY = y;
|
||||
}
|
||||
|
||||
scrollDelta(x = 0, y = 0, smooth = false) {
|
||||
scrollDelta(x = 0, y = 0, smooth = false, scrollTime = Configuration.smoothScrollTime) {
|
||||
if (smooth) {
|
||||
let previousScrollDelta = [0, 0];
|
||||
Utility.animate(0, x, Configuration.smoothScrollTime, x => {
|
||||
Utility.animate(0, x, scrollTime, x => {
|
||||
this.scrollDelta(x - previousScrollDelta[0], 0, false);
|
||||
previousScrollDelta[0] = x;
|
||||
});
|
||||
Utility.animate(0, y, Configuration.smoothScrollTime, y => {
|
||||
Utility.animate(0, y, scrollTime, y => {
|
||||
this.scrollDelta(0, y - previousScrollDelta[1], false);
|
||||
previousScrollDelta[1] = y;
|
||||
});
|
||||
@@ -8343,7 +8393,7 @@ const t={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},e
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/const i=e(class extends i$1{constructor(t$1){var e;if(super(t$1),t$1.type!==t.ATTRIBUTE||"style"!==t$1.name||(null===(e=t$1.strings)||void 0===e?void 0:e.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce(((e,r)=>{const s=t[r];return null==s?e:e+`${r=r.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${s};`}),"")}update(e,[r]){const{style:s}=e.element;if(void 0===this.vt){this.vt=new Set;for(const t in r)this.vt.add(t);return this.render(r)}this.vt.forEach((t=>{null==r[t]&&(this.vt.delete(t),t.includes("-")?s.removeProperty(t):s[t]="");}));for(const t in r){const e=r[t];null!=e&&(this.vt.add(t),t.includes("-")?s.setProperty(t,e):s[t]=e);}return x}});
|
||||
|
||||
/** @typedef {import("../element/WindowElement").default} WindowElement */
|
||||
/** @typedef {import("../../element/WindowElement").default} WindowElement */
|
||||
|
||||
/** @extends {IDraggablePositionedTemplate<WindowElement>} */
|
||||
class WindowTemplate extends IDraggablePositionedTemplate {
|
||||
@@ -8364,6 +8414,24 @@ class WindowTemplate extends IDraggablePositionedTemplate {
|
||||
})
|
||||
}
|
||||
|
||||
setup() {
|
||||
const leftBoundary = this.blueprint.template.gridLeftVisibilityBoundary();
|
||||
const topBoundary = this.blueprint.template.gridTopVisibilityBoundary();
|
||||
this.element.locationX = this.blueprint.scaleCorrectReverse(this.blueprint.mousePosition[0] - leftBoundary);
|
||||
this.element.locationY = this.blueprint.scaleCorrectReverse(this.blueprint.mousePosition[1] - topBoundary);
|
||||
this.element.updateComplete.then(() => {
|
||||
const bounding = this.blueprint.getBoundingClientRect();
|
||||
if (this.element.locationX + this.element.sizeX > bounding.width) {
|
||||
this.element.locationX = bounding.width - this.element.sizeX;
|
||||
}
|
||||
this.element.locationX = Math.max(0, this.element.locationX);
|
||||
if (this.element.locationY + this.element.sizeY > bounding.height) {
|
||||
this.element.locationY = bounding.height - this.element.sizeY;
|
||||
}
|
||||
this.element.locationY = Math.max(0, this.element.locationY);
|
||||
});
|
||||
}
|
||||
|
||||
render() {
|
||||
return y`
|
||||
<div class="ueb-window">
|
||||
@@ -8400,7 +8468,7 @@ class WindowTemplate extends IDraggablePositionedTemplate {
|
||||
}
|
||||
|
||||
/**
|
||||
* @typedef {import("../element/WindowElement").default} WindowElement
|
||||
* @typedef {import("../../element/WindowElement").default} WindowElement
|
||||
* @typedef {import("lit").PropertyValues} PropertyValues
|
||||
*/
|
||||
|
||||
@@ -9619,10 +9687,10 @@ class WindowElement extends IDraggableElement {
|
||||
super.initialize(entity, template);
|
||||
}
|
||||
|
||||
setup() {
|
||||
super.setup();
|
||||
this.locationX = this.blueprint.mousePosition[0];
|
||||
this.locationY = this.blueprint.mousePosition[1];
|
||||
computeSizes() {
|
||||
const bounding = this.getBoundingClientRect();
|
||||
this.sizeX = bounding.width;
|
||||
this.sizeY = bounding.height;
|
||||
}
|
||||
|
||||
cleanup() {
|
||||
|
||||
6
dist/ueblueprint.min.js
vendored
6
dist/ueblueprint.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -81,7 +81,6 @@ export default class Blueprint extends IElement {
|
||||
node.setSelected(selected)
|
||||
}
|
||||
|
||||
#avoidScrolling = false
|
||||
/** @type {Map<String, Number>} */
|
||||
#nodeNameCounter = new Map()
|
||||
/** @type {NodeElement[]}" */
|
||||
@@ -126,14 +125,14 @@ export default class Blueprint extends IElement {
|
||||
this.scrollY = y
|
||||
}
|
||||
|
||||
scrollDelta(x = 0, y = 0, smooth = false) {
|
||||
scrollDelta(x = 0, y = 0, smooth = false, scrollTime = Configuration.smoothScrollTime) {
|
||||
if (smooth) {
|
||||
let previousScrollDelta = [0, 0]
|
||||
Utility.animate(0, x, Configuration.smoothScrollTime, x => {
|
||||
Utility.animate(0, x, scrollTime, x => {
|
||||
this.scrollDelta(x - previousScrollDelta[0], 0, false)
|
||||
previousScrollDelta[0] = x
|
||||
})
|
||||
Utility.animate(0, y, Configuration.smoothScrollTime, y => {
|
||||
Utility.animate(0, y, scrollTime, y => {
|
||||
this.scrollDelta(0, y - previousScrollDelta[1], false)
|
||||
previousScrollDelta[1] = y
|
||||
})
|
||||
|
||||
@@ -24,6 +24,7 @@ export default class Configuration {
|
||||
static distanceThreshold = 5 // px
|
||||
static dragEventName = "ueb-drag"
|
||||
static dragGeneralEventName = "ueb-drag-general"
|
||||
static edgeScrollThreshold = 50
|
||||
static editTextEventName = {
|
||||
begin: "ueb-edit-text-begin",
|
||||
end: "ueb-edit-text-end",
|
||||
|
||||
@@ -108,10 +108,10 @@ export default class Utility {
|
||||
*/
|
||||
static convertLocation(viewportLocation, movementElement, ignoreScale = false) {
|
||||
const scaleCorrection = ignoreScale ? 1 : 1 / Utility.getScale(movementElement)
|
||||
const targetOffset = movementElement.getBoundingClientRect()
|
||||
const bounding = movementElement.getBoundingClientRect()
|
||||
let location = [
|
||||
Math.round((viewportLocation[0] - targetOffset.x) * scaleCorrection),
|
||||
Math.round((viewportLocation[1] - targetOffset.y) * scaleCorrection)
|
||||
Math.round((viewportLocation[0] - bounding.x) * scaleCorrection),
|
||||
Math.round((viewportLocation[1] - bounding.y) * scaleCorrection)
|
||||
]
|
||||
return location
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import ColorPickerWindowTemplate from "../template/ColorPickerWindowTemplate"
|
||||
import ColorPickerWindowTemplate from "../template/window/ColorPickerWindowTemplate"
|
||||
import Configuration from "../Configuration"
|
||||
import IDraggableElement from "./IDraggableElement"
|
||||
import WindowTemplate from "../template/WindowTemplate"
|
||||
import WindowTemplate from "../template/window/WindowTemplate"
|
||||
|
||||
/** @typedef {typeof WindowElement} WindowElementConstructor */
|
||||
|
||||
@@ -43,10 +43,10 @@ export default class WindowElement extends IDraggableElement {
|
||||
super.initialize(entity, template)
|
||||
}
|
||||
|
||||
setup() {
|
||||
super.setup()
|
||||
this.locationX = this.blueprint.mousePosition[0]
|
||||
this.locationY = this.blueprint.mousePosition[1]
|
||||
computeSizes() {
|
||||
const bounding = this.getBoundingClientRect()
|
||||
this.sizeX = bounding.width
|
||||
this.sizeY = bounding.height
|
||||
}
|
||||
|
||||
cleanup() {
|
||||
|
||||
@@ -455,7 +455,7 @@ export default class ObjectEntity extends IEntity {
|
||||
if (this.getClass() === Configuration.nodeType.macro) {
|
||||
return Utility.formatStringName(this.MacroGraphReference.getMacroName())
|
||||
}
|
||||
let memberName = this.FunctionReference.MemberName
|
||||
let memberName = this.FunctionReference?.MemberName
|
||||
if (memberName) {
|
||||
const memberParent = this.FunctionReference.MemberParent?.path ?? ""
|
||||
switch (memberName) {
|
||||
|
||||
@@ -74,7 +74,30 @@ export default class IMouseClickDrag extends IPointing {
|
||||
const movement = [e.movementX, e.movementY]
|
||||
this.dragTo(location, movement)
|
||||
if (this.#trackingMouse) {
|
||||
this.blueprint.mousePosition = this.locationFromEvent(e)
|
||||
this.blueprint.mousePosition = location
|
||||
}
|
||||
if (this.options.scrollGraphEdge) {
|
||||
const movementNorm = Math.sqrt(movement[0] * movement[0] + movement[1] * movement[1])
|
||||
const threshold = this.blueprint.scaleCorrect(Configuration.edgeScrollThreshold)
|
||||
const leftThreshold = this.blueprint.template.gridLeftVisibilityBoundary() + threshold
|
||||
const rightThreshold = this.blueprint.template.gridRightVisibilityBoundary() - threshold
|
||||
let scrollX = 0
|
||||
if (location[0] < leftThreshold) {
|
||||
scrollX = location[0] - leftThreshold
|
||||
} else if (location[0] > rightThreshold) {
|
||||
scrollX = location[0] - rightThreshold
|
||||
}
|
||||
const topThreshold = this.blueprint.template.gridTopVisibilityBoundary() + threshold
|
||||
const bottomThreshold = this.blueprint.template.gridBottomVisibilityBoundary() - threshold
|
||||
let scrollY = 0
|
||||
if (location[1] < topThreshold) {
|
||||
scrollY = location[1] - topThreshold
|
||||
} else if (location[1] > bottomThreshold) {
|
||||
scrollY = location[1] - bottomThreshold
|
||||
}
|
||||
scrollX = Utility.clamp(this.blueprint.scaleCorrectReverse(scrollX) ** 3 * movementNorm * 0.6, -20, 20)
|
||||
scrollY = Utility.clamp(this.blueprint.scaleCorrectReverse(scrollY) ** 3 * movementNorm * 0.6, -20, 20)
|
||||
this.blueprint.scrollDelta(scrollX, scrollY)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -124,6 +147,7 @@ export default class IMouseClickDrag extends IPointing {
|
||||
options.moveEverywhere ??= false
|
||||
options.movementSpace ??= blueprint?.getGridDOMElement()
|
||||
options.repositionOnClick ??= false
|
||||
options.scrollGraphEdge ??= false
|
||||
options.strictTarget ??= false
|
||||
super(target, blueprint, options)
|
||||
this.stepSize = parseInt(options?.stepSize ?? Configuration.gridSize)
|
||||
|
||||
@@ -3,6 +3,7 @@ import ElementFactory from "../../element/ElementFactory"
|
||||
import IMouseClickDrag from "./IMouseClickDrag"
|
||||
|
||||
/**
|
||||
* @typedef {import("../../Blueprint").default} Blueprint
|
||||
* @typedef {import("../../element/LinkElement").default} LinkElement
|
||||
* @typedef {import("../../element/LinkElement").LinkElementConstructor} LinkElementConstructor
|
||||
* @typedef {import("../../element/PinElement").default} PinElement
|
||||
@@ -68,6 +69,16 @@ export default class MouseCreateLink extends IMouseClickDrag {
|
||||
|
||||
linkValid = false
|
||||
|
||||
/**
|
||||
* @param {PinElement} target
|
||||
* @param {Blueprint} blueprint
|
||||
* @param {Object} options
|
||||
*/
|
||||
constructor(target, blueprint, options = {}) {
|
||||
options.scrollGraphEdge ??= true
|
||||
super(target, blueprint, options)
|
||||
}
|
||||
|
||||
startDrag(location) {
|
||||
if (this.target.nodeElement.getType() == Configuration.nodeType.knot) {
|
||||
this.#knotPin = this.target
|
||||
|
||||
@@ -2,7 +2,8 @@ import IMouseClickDrag from "./IMouseClickDrag"
|
||||
|
||||
export default class Select extends IMouseClickDrag {
|
||||
|
||||
constructor(target, blueprint, options) {
|
||||
constructor(target, blueprint, options = {}) {
|
||||
options.scrollGraphEdge ??= true
|
||||
super(target, blueprint, options)
|
||||
this.selectorElement = this.blueprint.template.selectorElement
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ export default class ISelectableDraggableTemplate extends IDraggablePositionedTe
|
||||
createDraggableObject() {
|
||||
return /** @type {MouseMoveDraggable} */(new MouseMoveNodes(this.element, this.blueprint, {
|
||||
draggableElement: this.getDraggableElement(),
|
||||
scrollGraphEdge: true,
|
||||
}))
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { html, nothing } from "lit"
|
||||
import ColorPickerWindowTemplate from "../ColorPickerWindowTemplate"
|
||||
import ColorPickerWindowTemplate from "../window/ColorPickerWindowTemplate"
|
||||
import Configuration from "../../Configuration"
|
||||
import ElementFactory from "../../element/ElementFactory"
|
||||
import PinTemplate from "./PinTemplate"
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import { html } from "lit"
|
||||
import { styleMap } from "lit/directives/style-map.js"
|
||||
import ColorHandlerElement from "../element/ColorHandlerElement"
|
||||
import ColorSliderElement from "../element/ColorSliderElement"
|
||||
import Configuration from "../Configuration"
|
||||
import LinearColorEntity from "../entity/LinearColorEntity"
|
||||
import Utility from "../Utility"
|
||||
import ColorHandlerElement from "../../element/ColorHandlerElement"
|
||||
import ColorSliderElement from "../../element/ColorSliderElement"
|
||||
import Configuration from "../../Configuration"
|
||||
import LinearColorEntity from "../../entity/LinearColorEntity"
|
||||
import Utility from "../../Utility"
|
||||
import WindowTemplate from "./WindowTemplate"
|
||||
|
||||
/**
|
||||
* @typedef {import("../element/WindowElement").default} WindowElement
|
||||
* @typedef {import("../../element/WindowElement").default} WindowElement
|
||||
* @typedef {import("lit").PropertyValues} PropertyValues
|
||||
*/
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { html } from "lit"
|
||||
import Configuration from "../Configuration"
|
||||
import IDraggablePositionedTemplate from "./IDraggablePositionedTemplate"
|
||||
import MouseMoveDraggable from "../input/mouse/MouseMoveDraggable"
|
||||
import SVGIcon from "../SVGIcon"
|
||||
import Configuration from "../../Configuration"
|
||||
import IDraggablePositionedTemplate from "../IDraggablePositionedTemplate"
|
||||
import MouseMoveDraggable from "../../input/mouse/MouseMoveDraggable"
|
||||
import SVGIcon from "../../SVGIcon"
|
||||
|
||||
/** @typedef {import("../element/WindowElement").default} WindowElement */
|
||||
/** @typedef {import("../../element/WindowElement").default} WindowElement */
|
||||
|
||||
/** @extends {IDraggablePositionedTemplate<WindowElement>} */
|
||||
export default class WindowTemplate extends IDraggablePositionedTemplate {
|
||||
@@ -25,6 +25,24 @@ export default class WindowTemplate extends IDraggablePositionedTemplate {
|
||||
})
|
||||
}
|
||||
|
||||
setup() {
|
||||
const leftBoundary = this.blueprint.template.gridLeftVisibilityBoundary()
|
||||
const topBoundary = this.blueprint.template.gridTopVisibilityBoundary()
|
||||
this.element.locationX = this.blueprint.scaleCorrectReverse(this.blueprint.mousePosition[0] - leftBoundary)
|
||||
this.element.locationY = this.blueprint.scaleCorrectReverse(this.blueprint.mousePosition[1] - topBoundary)
|
||||
this.element.updateComplete.then(() => {
|
||||
const bounding = this.blueprint.getBoundingClientRect()
|
||||
if (this.element.locationX + this.element.sizeX > bounding.width) {
|
||||
this.element.locationX = bounding.width - this.element.sizeX
|
||||
}
|
||||
this.element.locationX = Math.max(0, this.element.locationX)
|
||||
if (this.element.locationY + this.element.sizeY > bounding.height) {
|
||||
this.element.locationY = bounding.height - this.element.sizeY
|
||||
}
|
||||
this.element.locationY = Math.max(0, this.element.locationY)
|
||||
})
|
||||
}
|
||||
|
||||
render() {
|
||||
return html`
|
||||
<div class="ueb-window">
|
||||
@@ -77,10 +77,6 @@ ueb-blueprint svg {
|
||||
scrollbar-width: 0;
|
||||
}
|
||||
|
||||
ueb-blueprint[data-focused="true"] .ueb-viewport-body {
|
||||
overflow: scroll;
|
||||
}
|
||||
|
||||
.ueb-grid {
|
||||
--ueb-grid-line-actual-width: calc(var(--ueb-grid-line-width) / var(--ueb-scale));
|
||||
position: absolute;
|
||||
|
||||
@@ -29,7 +29,7 @@ ueb-link>svg {
|
||||
ueb-link .ueb-link-area path {
|
||||
visibility: visible;
|
||||
stroke: var(--ueb-link-color);
|
||||
stroke-width: calc(3px / var(--ueb-scale));
|
||||
stroke-width: calc(2px / var(--ueb-scale));
|
||||
}
|
||||
|
||||
ueb-link[data-dragging="true"] .ueb-link-area path,
|
||||
|
||||
Reference in New Issue
Block a user