added functionality to add multiple SVG's and IMG's.
This commit is contained in:
parent
3bbdd702db
commit
74e77f7492
2 changed files with 18 additions and 16 deletions
|
|
@ -284,12 +284,12 @@ $(function(){
|
|||
newSvg.transformable();
|
||||
newSvg.ftRegisterCallback(self.svgTransformUpdate);
|
||||
|
||||
file.id = id; // list entry id
|
||||
file.previewId = previewId;
|
||||
file.url = url;
|
||||
file.misfit = "";
|
||||
|
||||
self.placedDesigns.push(file);
|
||||
var fileCopy = $.extend(true,{},file);
|
||||
fileCopy.id = id; // list entry id
|
||||
fileCopy.previewId = previewId;
|
||||
fileCopy.url = url;
|
||||
fileCopy.misfit = "";
|
||||
self.placedDesigns.push(fileCopy);
|
||||
};
|
||||
self.loadSVG(url, callback);
|
||||
};
|
||||
|
|
@ -438,11 +438,13 @@ $(function(){
|
|||
newImg.transformable();
|
||||
//newImg.ftDisableRotate();
|
||||
newImg.ftRegisterCallback(self.svgTransformUpdate);
|
||||
file.id = id;
|
||||
file.previewId = previewId;
|
||||
file.url = url;
|
||||
file.subtype = "bitmap";
|
||||
self.placedDesigns.push(file);
|
||||
|
||||
var fileCopy = $.extend(true,{},file);
|
||||
fileCopy.id = id;
|
||||
fileCopy.previewId = previewId;
|
||||
fileCopy.url = url;
|
||||
fileCopy.subtype = "bitmap";
|
||||
self.placedDesigns.push(fileCopy);
|
||||
};
|
||||
img.src = url;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -160,7 +160,7 @@
|
|||
-->
|
||||
{{ _('Approx. Total Job Time') }}: <strong data-bind="text: estimatedPrintTimeString"></strong><br>
|
||||
<div data-bind="visible: isPrinting() || isPaused()">
|
||||
|
||||
|
||||
<div class="progress">
|
||||
<div class="bar" id="job_progressBar" data-bind="style: { width: progressString() + '%' }"> {{ _('Processed') }} : <strong data-bind="text: byteString"></strong></div>
|
||||
</div>
|
||||
|
|
@ -183,7 +183,7 @@
|
|||
</button>
|
||||
</div>
|
||||
<span>Passes</span>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
@ -533,7 +533,7 @@
|
|||
<i class="icon-camera icon-white"></i>
|
||||
<span>{{ _('Photo') }}</span>
|
||||
</a>
|
||||
|
||||
|
||||
</div>
|
||||
<div id="gcode_upload_progress" class="progress" style="width: 100%;">
|
||||
<div class="bar" style="width: 0%"></div>
|
||||
|
|
@ -601,7 +601,7 @@
|
|||
<div class="btn-group action-buttons">
|
||||
<!-- <a class="btn btn-mini" data-bind="attr: {href: $root.downloadLink($data), css: {disabled: !$root.downloadLink($data)}}"><i class="icon-download-alt" title="{{ _('Download') }}"></i></a>
|
||||
<div class="btn btn-mini" data-bind="click: function() { if ($root.enableRemove($data)) { $root.removeFile($data); } else { return; } }, css: {disabled: !$root.enableRemove($data)}"><i class="icon-trash" title="{{ _('Remove') }}"></i></div>-->
|
||||
<div class="btn" data-bind="click: function() { if(!$root.workingArea.isPlaced($data)){ $root.workingArea.placeSVG($data); } }, css: {disabled: $root.workingArea.isPlaced($data)}"><i class="icon-ok" title="{{ _('Use') }}">Add</i></div>
|
||||
<div class="btn" data-bind="click: function() { $root.workingArea.placeSVG($data); }"><i class="icon-ok" title="{{ _('Use') }}">Add</i></div>
|
||||
</div>
|
||||
</div>
|
||||
</script>
|
||||
|
|
@ -628,7 +628,7 @@
|
|||
<div class="btn-group action-buttons">
|
||||
<!-- <a class="btn btn-mini" data-bind="attr: {href: $root.downloadLink($data), css: {disabled: !$root.downloadLink($data)}}"><i class="icon-download-alt" title="{{ _('Download') }}"></i></a>
|
||||
<div class="btn btn-mini" data-bind="click: function() { if ($root.enableRemove($data)) { $root.removeFile($data); } else { return; } }, css: {disabled: !$root.enableRemove($data)}"><i class="icon-trash" title="{{ _('Remove') }}"></i></div>-->
|
||||
<div class="btn" data-bind="click: function() { if(!$root.workingArea.isPlaced($data)){ $root.workingArea.placeIMG($data); } }, css: {disabled: $root.workingArea.isPlaced($data)}"><i class="icon-ok" title="{{ _('Use') }}">Add</i></div>
|
||||
<div class="btn" data-bind="click: function() { $root.workingArea.placeIMG($data);}"><i class="icon-ok" title="{{ _('Use') }}">Add</i></div>
|
||||
</div>
|
||||
</div>
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Reference in a new issue