several bugfixes for the beta release
This commit is contained in:
parent
ccb2614deb
commit
a123a81783
5 changed files with 19 additions and 14 deletions
|
|
@ -1620,7 +1620,7 @@ input.search-query,
|
|||
}
|
||||
*/
|
||||
|
||||
.file_list_entry .title {
|
||||
#files .file_list_entry .title {
|
||||
margin-left: 3.3em;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -44,8 +44,6 @@ $(function(){
|
|||
self.show_conversion_dialog = function() {
|
||||
self.svg = self.workingArea.getCompositionSVG();
|
||||
self.gcodeFilesToAppend = self.workingArea.getPlacedGcodes();
|
||||
var gcodeFile = self.create_gcode_filename(self.workingArea.placedDesigns());
|
||||
self.gcodeFilename(gcodeFile);
|
||||
|
||||
if(self.svg !== undefined){
|
||||
if(self.laserIntensity() === undefined){
|
||||
|
|
@ -58,6 +56,9 @@ $(function(){
|
|||
}
|
||||
|
||||
// TODO: js svg conversion
|
||||
var gcodeFile = self.create_gcode_filename(self.workingArea.placedDesigns());
|
||||
self.gcodeFilename(gcodeFile);
|
||||
|
||||
self.title(gettext("Converting"));
|
||||
$("#dialog_vector_graphics_conversion").modal("show"); // calls self.convert() afterwards
|
||||
} else {
|
||||
|
|
@ -90,13 +91,21 @@ $(function(){
|
|||
if(uniqueDesigns > 1){
|
||||
gcode_name += "_"+(uniqueDesigns-1)+"more";
|
||||
}
|
||||
return gcode_name + ".gco";
|
||||
|
||||
return gcode_name;
|
||||
} else {
|
||||
// return "tmp"+Date.now()+".gco";
|
||||
console.error("no designs placed.");
|
||||
return;
|
||||
}
|
||||
};
|
||||
|
||||
self.settingsString = ko.computed(function(){
|
||||
var intensity = self.laserIntensity();
|
||||
var feedrate = self.laserSpeed();
|
||||
var settingsString = "_i" + intensity + "s" + Math.round(feedrate);
|
||||
return settingsString;
|
||||
});
|
||||
|
||||
self.slicer.subscribe(function(newValue) {
|
||||
self.profilesForSlicer(newValue);
|
||||
|
|
@ -190,12 +199,8 @@ $(function(){
|
|||
if(self.gcodeFilesToAppend.length === 1 && self.svg === undefined){
|
||||
self.files.startGcodeWithSafetyWarning(self.gcodeFilesToAppend[0]);
|
||||
} else {
|
||||
var gcodeFilename = self._sanitize(self.gcodeFilename());
|
||||
if (!_.endsWith(gcodeFilename.toLowerCase(), ".gco")
|
||||
&& !_.endsWith(gcodeFilename.toLowerCase(), ".gcode")
|
||||
&& !_.endsWith(gcodeFilename.toLowerCase(), ".g")) {
|
||||
gcodeFilename = gcodeFilename + ".gco";
|
||||
}
|
||||
var filename = self.gcodeFilename() + self.settingsString() + '.gco';
|
||||
var gcodeFilename = self._sanitize(filename);
|
||||
|
||||
var data = {
|
||||
command: "convert",
|
||||
|
|
|
|||
|
|
@ -309,7 +309,7 @@
|
|||
<li><a href="#" data-bind="click: function() { $root.listHelper.changeSorting('size'); }"><i class="icon-ok" data-bind="style: {visibility: listHelper.currentSorting() == 'size' ? 'visible' : 'hidden'}"></i> {{ _('Sort by file size') }} ({{ _('descending') }})</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="#" data-bind="click: function() { $root.listHelper.toggleFilter('machinecode'); }"><i class="icon-ok" data-bind="style: {visibility: _.contains(listHelper.currentFilters(), 'machinecode') ? 'visible' : 'hidden'}"></i> {{ _('Only show GCode files') }}</a></li>
|
||||
<li><a href="#" data-bind="click: function() { $root.listHelper.toggleFilter('model'); }"><i class="icon-ok" data-bind="style: {visibility: _.contains(listHelper.currentFilters(), 'model') ? 'visible' : 'hidden'}"></i> {{ _('Only show non GCode files') }}</a></li>
|
||||
<li><a href="#" data-bind="click: function() { $root.listHelper.toggleFilter('model'); }"><i class="icon-ok" data-bind="style: {visibility: _.contains(listHelper.currentFilters(), 'model') ? 'visible' : 'hidden'}"></i> {{ _('Only show design files') }}</a></li>
|
||||
<li class="divider"></li>
|
||||
</ul>
|
||||
<div class="muted text-right">
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
<div class="controls">
|
||||
<div class="input-append">
|
||||
<input type="text" data-bind="value: gcodeFilename">
|
||||
<span class="add-on">.gco</span>
|
||||
<span class="add-on"><span data-bind="text:settingsString"></span>.gco</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -99,10 +99,10 @@ function TerminalViewModel(loginStateViewModel, settingsViewModel) {
|
|||
}
|
||||
|
||||
//var re = /^([gmt][0-9]+)(\s.*)?/;
|
||||
var re = /^(([gmtfs][0-9]+)|(\$[cinhgx#$])|([?~!]))(\s.*)?/; // grbl style
|
||||
var re = /^([gmtfs][0-9]+|\$[cinhgx#$]|[?~!])(.*)?/; // grbl style
|
||||
var commandMatch = command.match(re);
|
||||
if (commandMatch != null) {
|
||||
command = commandMatch[1].toUpperCase() + ((commandMatch[2] !== undefined) ? commandMatch[2] : "");
|
||||
command = commandMatch[1].toUpperCase() + ((commandMatch[2] !== undefined) ? commandMatch[2].toUpperCase() : "");
|
||||
}
|
||||
|
||||
if (command) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue