Skip to content
GitLab
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
1520e72e
Commit
1520e72e
authored
Sep 15, 2017
by
bbaer
Browse files
seems to work.
parent
f34ef88e
Changes
2
Hide whitespace changes
Inline
Side-by-side
javascript/src/Plugins/qfq.fabric.js
View file @
1520e72e
...
...
@@ -236,6 +236,7 @@ $(function (n) {
this
.
modeSettings
.
initialize
(
this
,
jsonButtons
);
this
.
emojiHandler
.
initialize
(
this
,
jsonEmojis
);
this
.
setBackground
(
jsonImages
);
this
.
setBrush
();
};
n
.
Fabric
.
prototype
.
setBackground
=
function
(
imageSelector
)
{
...
...
@@ -252,7 +253,9 @@ $(function (n) {
});
that.canvas.setBackgroundImage(img, that.canvas.renderAll.bind(that.canvas));
});*/
var
$image
=
document
.
getElementById
(
imageSelector
);
var
getJSON
=
$
(
'
#fabric
'
).
data
(
'
images
'
);
console
.
log
(
getJSON
.
images
[
0
].
selector
);
var
$image
=
document
.
getElementById
(
getJSON
.
images
[
0
].
selector
);
var
img
=
new
fabric
.
Image
(
$image
,
{
width
:
this
.
canvas
.
width
,
height
:
this
.
canvas
.
height
,
...
...
mockup/fabric.html
View file @
1520e72e
...
...
@@ -42,10 +42,10 @@
<div
class=
"row"
>
<div
class=
"col-md-4"
>
<div
id=
"fabric"
data-images=
'{"images": [{"page": 1, "selector": "qfq-fabric-image-1"}, {"page":2, "selector": "#qfq..."}]}'
>
<div
id=
"fabric"
data-images=
'{"images": [{"page": 1, "selector": "qfq-fabric-image-1"}, {"page":2, "selector": "#qfq..."}]}'
></div>
<div
id=
"fabric-controls"
>
</div>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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