Update spline_editor.js

This commit is contained in:
kijai 2024-05-06 21:39:22 +03:00
parent 3b999778f0
commit 07ba67864a

View File

@ -207,6 +207,8 @@ app.registerExtension({
function createSplineEditor(context, reset=false) {
console.log("creatingSplineEditor")
// context menu
function createContextMenu() {
document.addEventListener('contextmenu', function(e) {
e.preventDefault();
});
@ -294,10 +296,12 @@ context.menuItem4.addEventListener('click', function(e) {
}
context.contextMenu.style.display = 'none';
});
}
var dotShape = "circle";
var drawSamplePoints = false;
createContextMenu();
function updatePath() {
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)
.visible(false)
vis.add(pv.Rule)
.data(pv.range(0, h, 64))
.bottom(d => d)