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
8b275556
Commit
8b275556
authored
Jan 11, 2018
by
bbaer
Browse files
loadJSON with callback
parent
d8cb9ea7
Changes
1
Hide whitespace changes
Inline
Side-by-side
javascript/src/Plugins/qfq.fabric.js
View file @
8b275556
...
...
@@ -325,19 +325,18 @@ $(function (n) {
n
.
Fabric
.
prototype
.
prepareStaticCanvas
=
function
(
width
,
height
)
{
console
.
log
(
"
prepareStaticCanvas
"
);
var
that
=
this
;
this
.
generateStaticCanvas
(
width
,
height
);
if
(
this
.
fabricJSON
)
{
this
.
canvas
.
loadFromJSON
(
this
.
fabricJSON
);
this
.
canvas
.
loadFromJSON
(
this
.
fabricJSON
,
function
()
{
that
.
canvas
.
renderAll
();
that
.
resizeCanvas
();
that
.
canvas
.
renderAll
();
});
}
else
{
this
.
setBackground
();
this
.
canvas
.
renderAll
();
}
this
.
canvas
.
renderAll
();
var
that
=
this
;
setTimeout
(
function
()
{
that
.
resizeCanvas
();
that
.
canvas
.
renderAll
();
},
1000
);
};
n
.
Fabric
.
prototype
.
generateStaticCanvas
=
function
(
width
,
height
)
{
...
...
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