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
e92278e3
Commit
e92278e3
authored
Sep 08, 2017
by
bbaer
Browse files
fixed rectangle that were hard to select after creation
parent
fadcb82e
Changes
8
Hide whitespace changes
Inline
Side-by-side
extension/Resources/Public/icons/black_dot.png
0 → 100644
View file @
e92278e3
1.47 KB
extension/Resources/Public/icons/blue_dot.png
0 → 100644
View file @
e92278e3
1.5 KB
extension/Resources/Public/icons/green_bg.png
0 → 100644
View file @
e92278e3
658 Bytes
extension/Resources/Public/icons/red_bg.png
0 → 100644
View file @
e92278e3
608 Bytes
extension/Resources/Public/icons/red_dot.png
0 → 100644
View file @
e92278e3
1.51 KB
javascript/src/Plugins/qfq.fabric.js
View file @
e92278e3
...
...
@@ -13,7 +13,6 @@ $(function () {
var
fgColor
=
'
#000
'
;
var
borderColor
=
'
#000
'
;
var
borderSize
=
5
;
var
brushWidth
=
2
;
var
textSize
=
16
;
var
addPositionLeft
=
20
;
var
addPositionTop
=
20
;
...
...
@@ -70,9 +69,10 @@ $(function () {
rect
.
hasControls
=
true
;
canvas
.
selection
=
true
;
canvas
.
discardActiveObject
();
canvas
.
remove
(
rect
);
canvas
.
add
(
rect
);
canvas
.
renderAll
();
var
group
=
new
canvas
.
Group
([
rect
]);
canvas
.
add
(
group
);
}
function
adjustDefaultPosition
()
{
...
...
@@ -110,10 +110,11 @@ $(function () {
width
:
pointer
.
x
-
origX
,
height
:
pointer
.
y
-
origY
,
angle
:
0
,
fill
:
'
rgba(255,0,0,0.
5
)
'
,
fill
:
'
rgba(255,0,0,0.
4
)
'
,
strokeWidth
:
borderSize
,
stroke
:
'
rgba(255, 0, 0, 1)
'
,
selectable
:
true
,
borderScaleFactor
:
0
,
hasControls
:
false
});
canvas
.
add
(
rect
);
...
...
@@ -146,7 +147,8 @@ $(function () {
fontSize
:
textSize
,
color
:
'
#000
'
,
left
:
10
,
top
:
10
top
:
10
,
editable
:
true
});
var
rect
=
new
fabric
.
Rect
();
rect
.
set
({
...
...
@@ -207,18 +209,18 @@ $(function () {
}
});
canvas
.
on
(
'
key
:
up
'
,
function
(
e
)
{
canvas
.
onkeyup
=
function
(
e
)
{
if
(
e
.
keyCode
==
46
)
{
deleteActiveGroup
();
}
});
console
.
log
(
e
.
keyCode
);
};
setBackground
(
imageURL
);
$
(
"
#clear-canvas
"
).
on
(
"
click
"
,
function
()
{
canvas
.
clear
();
setBackground
(
imageURL
);
deleteActiveGroup
();
});
$
(
"
#text-bg-submit
"
).
on
(
"
click
"
,
function
()
{
...
...
less/qfq-bs.css.less
View file @
e92278e3
...
...
@@ -185,7 +185,7 @@ i.@{spinner_class} {
background-image: url("../icons/white_bg.png");
}
#text-yellow-bg {
#text-yellow-bg
, #highlight-yellow
{
background-image: url("../icons/yellow_bg.png");
}
...
...
@@ -193,6 +193,18 @@ i.@{spinner_class} {
background-image: url("../icons/yellow_border.png");
}
#draw-black {
background-image: url("../icons/black_dot.png");
}
#draw-blue {
background-image: url("../icons/blue_dot.png");
}
#draw-red {
background-image: url("../icons/red_dot.png");
}
// typeAhead Input: Default Bootstrap column width
.twitter-typeahead {
display: block !important;
...
...
mockup/fabric.html
View file @
e92278e3
...
...
@@ -45,6 +45,14 @@
<button
class=
"btn btn-default"
id=
"add-rect"
><span
class=
"glyphicon glyphicon-stop"
></span></button>
<button
class=
"btn btn-default"
id=
"move-mode"
><span
class=
"glyphicon glyphicon-move"
></span></button>
</div>
<div
class=
"drawing-control"
id=
"user-drawing-control"
>
<div
class=
"drawing-options"
>
<button
type=
"button"
class=
"text-bg-toggle"
id=
"draw-black"
></button>
<button
type=
"button"
class=
"text-bg-toggle"
id=
"draw-blue"
></button>
<button
type=
"button"
class=
"text-bg-toggle"
id=
"draw-red"
></button>
<button
type=
"button"
class=
"text-bg-toggle"
id=
"highlight-yellow"
></button>
</div>
</div>
<div
class=
"text-insert"
style=
"display:none;"
id=
"user-text-control"
>
<textarea
class=
"fabric-text"
placeholder=
"Remember, be nice!"
id=
"text-user-value"
></textarea>
<div
class=
"text-options"
>
...
...
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