Diffent event listener to avoid overload.

This commit is contained in:
Gijs 2024-03-29 10:18:03 +01:00
parent 64839e50bd
commit 07328fdbae
2 changed files with 15 additions and 6 deletions

View File

@ -1,14 +1,23 @@
# from hpgl_multipen_output import HpglMultipenOutput
from hpgl_output_adapted import HpglOutputAdapted
from hpgl_multipen_output import HpglMultipenOutput
import subprocess
# from hpgl_output_adapted import HpglOutputAdapted
def svgToHPGL (path, speed=1, penCount=8, force=2):
e = HpglOutputAdapted()
subprocess.call(['inkscape',
'-f', path,
'--verb', 'EditSelectAll',
'--verb', 'ObjectToPath',
'--verb', 'FileSave',
'--verb', 'FileQuit' ])
e = HpglMultipenOutput()
e.affect([
'--orientation', '0',
'--orientation', '270',
'--force', '0',
'--overcut', '0',
'--precut', 'false',
'--flat', '4',
'--flat', '8',
'--toolOffset', '0',
'--autoAlign', 'false',
'--speed', str(speed),

View File

@ -72,7 +72,7 @@
// --- get-input but on the pad and checkbox but on the pad
let inputs = document.getElementsByClassName('get-input');
for(let input of inputs){
input.addEventListener('input', function(){
input.addEventListener('change', function(){
let frame = document.getElementById(input.dataset.frame);
const url = new URL(frame.src);