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
2ebc276f
Commit
2ebc276f
authored
Jan 08, 2018
by
bbaer
Browse files
writes image to output file now
parent
0584fdf8
Changes
3
Hide whitespace changes
Inline
Side-by-side
javascript/src/Plugins/qfq.fabric.js
View file @
2ebc276f
...
...
@@ -255,6 +255,7 @@ $(function (n) {
if
(
viewOnly
)
{
this
.
getMeta
(
this
.
backgroundImage
,
function
(
width
,
height
)
{
that
.
prepareStaticCanvas
(
width
,
height
);
}
);
}
else
if
(
editImage
)
{
this
.
outputField
=
$
(
"
#
"
+
inputField
);
this
.
getMeta
(
this
.
backgroundImage
,
function
(
width
,
height
)
{
that
.
prepareImageEditor
(
width
,
height
);});
this
.
modeSettings
.
initialize
(
this
,
jsonButtons
);
}
else
{
...
...
@@ -783,6 +784,7 @@ $(function (n) {
n
.
Fabric
.
prototype
.
exportToPNG
=
function
(
height
,
width
,
rotated
)
{
var
png
=
this
.
canvas
.
toDataURL
(
'
png
'
);
$
(
"
#target-png
"
).
attr
(
"
src
"
,
png
);
this
.
outputField
.
val
(
""
+
png
);
var
img
=
this
.
canvas
.
item
(
0
);
img
.
width
=
width
;
img
.
height
=
height
;
...
...
mockup/fabric.html
View file @
2ebc276f
...
...
@@ -40,8 +40,11 @@
<div
class=
"row"
>
<div
class=
"col-md-4"
>
<div
class=
"fabric"
data-buttons=
"mockData/fabric.buttons.json"
data-emojis=
"mockData/qfq.emoji.json"
data-control-name=
'fabric-output'
></div>
<div
class=
"fabric"
data-buttons=
"mockData/fabric.buttons.json"
data-emojis=
"mockData/qfq.emoji.json"
data-control-name=
'fabric-output'
>
</div>
<input
id=
"fabric-output"
name=
"fabric-data"
type=
"hidden"
>
...
...
mockup/imageEditorFabric.html
View file @
2ebc276f
...
...
@@ -41,8 +41,10 @@
<div
class=
"fabric"
data-buttons=
"mockData/fabric.editor.buttons.json"
data-edit-image=
"true"
data-background-image=
"mockData/Scan2a.jpeg"
>
data-background-image=
"mockData/Scan2a.jpeg"
data-control-name=
'fabric-output'
>
</div>
<input
id=
"fabric-output"
name=
"fabric-data"
type=
"hidden"
>
</div>
<div
class=
"col-md-8"
>
<img
id=
"target-png"
>
...
...
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