Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
typo3
qfq
Commits
db36a79d
Commit
db36a79d
authored
Jan 08, 2018
by
bbaer
Browse files
resize with fixed value
parent
2ebc276f
Changes
1
Hide whitespace changes
Inline
Side-by-side
javascript/src/Plugins/qfq.fabric.js
View file @
db36a79d
...
...
@@ -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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment