Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
qfq
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
typo3
qfq
Commits
f945c9f7
Commit
f945c9f7
authored
2 years ago
by
bbaer
Browse files
Options
Downloads
Patches
Plain Diff
updated to fabric 5
parent
03f93d8a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!451
Fabric update
Pipeline
#7416
passed
2 years ago
Stage: build
Changes
2
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
javascript/fabric.min.js
+1
-6285
1 addition, 6285 deletions
javascript/fabric.min.js
javascript/src/Plugins/qfq.fabric.js
+10
-11
10 additions, 11 deletions
javascript/src/Plugins/qfq.fabric.js
with
11 additions
and
6296 deletions
javascript/fabric.min.js
+
1
−
6285
View file @
f945c9f7
This diff is collapsed.
Click to expand it.
javascript/src/Plugins/qfq.fabric.js
+
10
−
11
View file @
f945c9f7
...
...
@@ -330,7 +330,7 @@ $(function (n) {
this
.
canvas
.
loadFromJSON
(
fabricJSON
,
function
()
{
this
.
firstLoad
=
true
;
that
.
setBackground
();
that
.
resizeCanvas
();
//
that.resizeCanvas();
if
(
!
isReadOnly
)
{
that
.
setBrush
();
}
that
.
canvas
.
renderAll
();
that
.
userChangePossible
=
true
;
...
...
@@ -546,14 +546,12 @@ $(function (n) {
if
(
this
.
backgroundImage
)
{
fabric
.
Image
.
fromURL
(
this
.
backgroundImage
,
function
(
img
)
{
img
.
set
({
width
:
that
.
canvas
.
width
,
height
:
that
.
canvas
.
height
,
originX
:
'
left
'
,
originY
:
'
top
'
,
lockUniScaling
:
true
,
centeredScaling
:
true
,
centeredRotation
:
true
});
img
.
scaleX
=
that
.
canvas
.
width
/
img
.
width
;
img
.
scaleY
=
that
.
canvas
.
height
/
img
.
height
;
that
.
canvas
.
setBackgroundImage
(
img
,
function
()
{
that
.
canvas
.
renderAll
.
bind
(
that
.
canvas
);
that
.
canvas
.
renderAll
();
...
...
@@ -564,14 +562,14 @@ $(function (n) {
$image
.
onload
=
function
()
{
console
.
log
(
"
Image loaded
"
);
var
img
=
new
fabric
.
Image
(
this
,
{
width
:
that
.
canvas
.
width
,
height
:
that
.
canvas
.
height
,
originX
:
'
left
'
,
originY
:
'
top
'
,
lockUniScaling
:
true
,
centeredScaling
:
true
,
centeredRotation
:
true
});
img
.
scaleX
=
that
.
canvas
.
width
/
img
.
width
;
img
.
scaleY
=
that
.
canvas
.
height
/
img
.
height
;
img
.
rotate
(
that
.
rotation
);
that
.
canvas
.
setBackgroundImage
(
img
,
function
()
{
that
.
canvas
.
renderAll
.
bind
(
that
.
canvas
);
...
...
@@ -664,9 +662,9 @@ $(function (n) {
// for Fabric 1.x and current Fabric 2.0 beta has a major drawing bug.
n
.
Fabric
.
prototype
.
deleteActiveGroup
=
function
()
{
var
that
=
this
;
if
(
this
.
canvas
.
getActive
Group
())
{
this
.
canvas
.
getActive
Group
().
forEach
Object
(
function
(
o
)
{
that
.
canvas
.
remove
(
o
)
});
this
.
canvas
.
discardActive
Group
().
renderAll
();
if
(
this
.
canvas
.
getActive
Objects
())
{
this
.
canvas
.
getActive
Objects
().
forEach
(
function
(
o
)
{
that
.
canvas
.
remove
(
o
)
});
this
.
canvas
.
discardActive
Object
().
renderAll
();
}
else
{
this
.
canvas
.
remove
(
this
.
canvas
.
getActiveObject
());
}
...
...
@@ -1048,13 +1046,14 @@ $(function (n) {
}
var
that
=
this
;
this
.
outputField
.
val
(
JSON
.
stringify
(
that
.
canvas
.
toJSON
()));
/*
if (this.qfqPage.qfqForm) {
this.qfqPage.qfqForm.eventEmitter.emitEvent('form.changed', n.EventEmitter.makePayload(that, null));
this.qfqPage.qfqForm.changeHandler();
this.qfqPage.qfqForm.form.formChanged = true;
} else {
throw("Error: Couldn't initialize qfqForm - not possible to send form.changed event");
}
}
*/
}
};
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment