Commit db36a79d authored by bbaer's avatar bbaer
Browse files

resize with fixed value

parent 2ebc276f
......@@ -763,8 +763,8 @@ $(function (n) {
var oldHeight = img.height;
var oldWidth = img.width;
var rotated = false;
img.width = img.width * 2;
img.height = img.height * 2;
img.height = 1200 * img.height / img.width;
img.width = 1200;
if (this.rotation === 90 || this.rotation === 270) {
// width is now height and viceversa
rotated = true;
......@@ -985,49 +985,4 @@ $(function (n) {
});
};
/*
later
$("#text-bg-submit").on("click", function() {
n.fabric.userText = $("#text-user-value").val();
n.fabric.drawTextBoxMode = true;
$("#text-user-value").val('');
});
To be integrated, save to localstorage & at the and as ajax to server.
Export to image is a maybe. Mainly here for future reference.
$("#save1").on("click", function() {
if (!n.fabric.saveOne) {
n.fabric.saveOne = n.fabric.canvas.toJSON();
} else {
n.fabric.canvas.loadFromJSON(saveOne);
}
});
$("#save2").on("click", function() {
if (!n.fabric.saveTwo) {
n.fabric.saveTwo = n.fabric.canvas.toJSON();
} else {
n.fabric.canvas.loadFromJSON(saveTwo);
}
});
$("#save3").on("click", function() {
if (!saveThree) {
n.fabric.saveThree = canvas.toJSON();
} else {
n.fabric.canvas.loadFromJSON(saveThree);
}
});
$("#export-svg").on("click", function() {
var svg = n.fabric.canvas.toSVG();
var png = n.fabric.canvas.toDataURL('png');
$("#target-svg").html(svg);
$("#target-png").attr("src", png);
});
*/
}(QfqNS));
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment