better drop behaviour
This commit is contained in:
parent
72b8a09ccd
commit
07918b9f0d
2 changed files with 15 additions and 3 deletions
|
|
@ -239,17 +239,17 @@
|
|||
data-bind="visible: working_area_empty"
|
||||
style="font-size:64px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#DDDDDD;fill-opacity:1;stroke:none;font-family:DIN-BoldAlternate;-inkscape-font-specification:DIN-BoldAlternate Bold"
|
||||
x="396.81018"
|
||||
y="592.36218"
|
||||
y="552.36218"
|
||||
id="add_designs_hint"
|
||||
>
|
||||
<tspan
|
||||
id="tspan2987" x="368.571426" y="532.36218"
|
||||
style="text-anchor:middle;text-align:center">add designs via </tspan>
|
||||
<tspan
|
||||
x="368.571426" y="592.36218" id="tspan2989"
|
||||
x="500" y="592.36218" id="tspan2989"
|
||||
style="text-anchor:middle;text-align:center">the design library </tspan>
|
||||
<tspan
|
||||
x="368.571426" y="652.36218" id="tspan2993"
|
||||
x="568.571426" y="652.36218" id="tspan2993"
|
||||
style="text-anchor:middle;text-align:center">or drag 'n' drop </tspan>
|
||||
<tspan
|
||||
x="368.571426" y="712.36218" id="tspan2991"
|
||||
|
|
|
|||
|
|
@ -222,6 +222,18 @@ $(function() {
|
|||
$("#gcode_upload_progress").removeClass("progress-striped").removeClass("active");
|
||||
$("#gcode_upload_progress .bar").text("");
|
||||
}
|
||||
|
||||
if(data.result.files.hasOwnProperty("local")){
|
||||
var f = data.result.files.local;
|
||||
if(_.endsWith(filename.toLowerCase(), ".svg")){
|
||||
f.type = "model"
|
||||
viewModelMap['workingAreaViewModel'].placeSVG(f);
|
||||
}
|
||||
if(_.endsWith(filename.toLowerCase(), ".gco")){
|
||||
f.type = "machinecode"
|
||||
viewModelMap['workingAreaViewModel'].placeGcode(f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function gcode_upload_fail(e, data) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue