mirror of
https://git.datalinker.icu/kijai/ComfyUI-KJNodes.git
synced 2025-12-19 01:34:31 +08:00
Update spline_editor.js
This commit is contained in:
parent
3b999778f0
commit
07ba67864a
@ -207,6 +207,8 @@ app.registerExtension({
|
|||||||
function createSplineEditor(context, reset=false) {
|
function createSplineEditor(context, reset=false) {
|
||||||
console.log("creatingSplineEditor")
|
console.log("creatingSplineEditor")
|
||||||
|
|
||||||
|
// context menu
|
||||||
|
function createContextMenu() {
|
||||||
document.addEventListener('contextmenu', function(e) {
|
document.addEventListener('contextmenu', function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
});
|
});
|
||||||
@ -294,10 +296,12 @@ context.menuItem4.addEventListener('click', function(e) {
|
|||||||
}
|
}
|
||||||
context.contextMenu.style.display = 'none';
|
context.contextMenu.style.display = 'none';
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
var dotShape = "circle";
|
var dotShape = "circle";
|
||||||
var drawSamplePoints = false;
|
var drawSamplePoints = false;
|
||||||
|
|
||||||
|
createContextMenu();
|
||||||
function updatePath() {
|
function updatePath() {
|
||||||
let coords = samplePoints(pathElements[0], points_to_sample, samplingMethod, w);
|
let coords = samplePoints(pathElements[0], points_to_sample, samplingMethod, w);
|
||||||
|
|
||||||
@ -478,6 +482,7 @@ context.menuItem4.addEventListener('click', function(e) {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
var backgroundImage = vis.add(pv.Image)
|
var backgroundImage = vis.add(pv.Image)
|
||||||
|
.visible(false)
|
||||||
vis.add(pv.Rule)
|
vis.add(pv.Rule)
|
||||||
.data(pv.range(0, h, 64))
|
.data(pv.range(0, h, 64))
|
||||||
.bottom(d => d)
|
.bottom(d => d)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user