Merge branch 'stable-1.2.2' into mrbeam-multipass
Conflicts: src/octoprint/static/js/app/viewmodels/printerstate.js src/octoprint/util/comm_acc2.py
This commit is contained in:
commit
cfacbe2610
4 changed files with 32 additions and 16 deletions
|
|
@ -70,12 +70,14 @@ Snap.plugin(function (Snap, Element, Paper, global) {
|
|||
|
||||
// Validity checks from http://www.w3.org/TR/SVG/shapes.html#RectElement:
|
||||
// If 'x' and 'y' are not specified, then set both to 0. // CorelDraw is creating that sometimes
|
||||
if (!isFinite(x))
|
||||
if (!isFinite(x)) {
|
||||
console.log('No attribute "x" in image tag. Assuming 0.')
|
||||
x = 0;
|
||||
if (!isFinite(y))
|
||||
}
|
||||
if (!isFinite(y)) {
|
||||
console.log('No attribute "y" in image tag. Assuming 0.')
|
||||
y = 0;
|
||||
}
|
||||
var transform = elem.transform();
|
||||
var matrix = transform['totalMatrix'];
|
||||
var transformedX = matrix.x(x, y);
|
||||
|
|
|
|||
|
|
@ -345,7 +345,7 @@ $(function(){
|
|||
dx = -svgBB.x + 0.01;
|
||||
outside = true;
|
||||
} else if(svgBB.x2 > waBB.x2){
|
||||
dx = -svgBB.x2 + waBB.x2 - 0.01;
|
||||
dx = -svgBB.x + 0.01;
|
||||
outside = true;
|
||||
}
|
||||
if(svgBB.y < waBB.y){
|
||||
|
|
@ -426,10 +426,16 @@ $(function(){
|
|||
};
|
||||
|
||||
self.getUsefulDimensions = function(wpx, hpx){
|
||||
var maxWidthMM = wpx * 0.25; // TODO parametrize
|
||||
var aspectRatio = wpx / hpx;
|
||||
var destWidthMM = Math.min(self.workingAreaWidthMM() - 2, maxWidthMM);
|
||||
var destHeightMM = destWidthMM / aspectRatio;
|
||||
var maxWidthMM = wpx * 0.25; // TODO parametrize
|
||||
var maxHeightMM = hpx * 0.25; // TODO parametrize
|
||||
var aspectRatio = wpx / hpx;
|
||||
var destWidthMM = Math.min(self.workingAreaWidthMM() - 2, maxWidthMM);
|
||||
var destHeightMM = Math.min(self.workingAreaHeightMM() - 2, maxHeightMM);
|
||||
if ((destWidthMM / aspectRatio) > destHeightMM) {
|
||||
destWidthMM = destHeightMM * aspectRatio;
|
||||
} else {
|
||||
destHeightMM = destWidthMM / aspectRatio;
|
||||
}
|
||||
var destWidthPT = self.mm2svgUnits(destWidthMM);
|
||||
var destHeightPT = self.mm2svgUnits(destHeightMM);
|
||||
return [destWidthPT, destHeightPT];
|
||||
|
|
@ -758,7 +764,12 @@ $(function(){
|
|||
self._embedAllImages = function(svg, callback){
|
||||
|
||||
var allImages = svg.selectAll('image');
|
||||
var linkedImages = allImages.items.filter(function(i){ return !i.attr('href').startsWith('data:') });
|
||||
var linkedImages = allImages.items.filter(function(i){
|
||||
if(i.attr('xlink:href') != null) {
|
||||
return !i.attr('xlink:href').startsWith('data:');
|
||||
} else if(i.attr('href') != null) {
|
||||
return !i.attr('href').startsWith('data:');
|
||||
}});
|
||||
if(linkedImages.length > 0){
|
||||
var callbackCounter = linkedImages.length;
|
||||
for (var i = 0; i < linkedImages.length; i++) {
|
||||
|
|
|
|||
|
|
@ -357,7 +357,7 @@ $(function() {
|
|||
self.intensityOverrideSlider.slider('setValue', 100);
|
||||
self.intensityOverride(100);
|
||||
self.feedrateOverride(100);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
OCTOPRINT_VIEWMODELS.push([
|
||||
|
|
|
|||
|
|
@ -835,6 +835,9 @@ class MachineCom(object):
|
|||
if self._currentFile is None:
|
||||
raise ValueError("No file selected for printing")
|
||||
|
||||
# reset feedrate and intesity factor in case they where changed in a previous run
|
||||
self._feedrate_factor = 1
|
||||
self._intensity_factor = 1
|
||||
self._passes = 1
|
||||
|
||||
try:
|
||||
|
|
|
|||
Loading…
Reference in a new issue