Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drawing-app
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
sweng-group-15
drawing-app
Commits
5c09cf3f
Commit
5c09cf3f
authored
5 years ago
by
Giovanni Caruso
Browse files
Options
Downloads
Patches
Plain Diff
Fix log message
parent
659074d3
No related branches found
Branches containing commit
No related tags found
2 merge requests
!42
Colouredlines
,
!41
Colouredlines
Pipeline
#102755
passed
5 years ago
Stage: fetch
Stage: deps
Stage: check
Stage: build
Stage: test
Changes
5
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
public/index.html
+19
-0
19 additions, 0 deletions
public/index.html
public/styles.css
+36
-2
36 additions, 2 deletions
public/styles.css
src/app.js
+6
-0
6 additions, 0 deletions
src/app.js
src/canvas.js
+0
-1
0 additions, 1 deletion
src/canvas.js
src/elements.js
+2
-0
2 additions, 0 deletions
src/elements.js
with
63 additions
and
3 deletions
public/index.html
+
19
−
0
View file @
5c09cf3f
...
@@ -76,6 +76,25 @@
...
@@ -76,6 +76,25 @@
<div
id=
"rectangle"
></div>
<div
id=
"rectangle"
></div>
</a>
</a>
</div>
</div>
<div
class=
"pen-body"
>
<div
id=
"brush-colour"
>
<h3>
Brush size
</h3>
</div>
<div
class=
"slide-size"
>
<input
type=
"range"
min=
"1"
max=
"100"
value=
"50"
class=
"slider"
id=
"range"
/>
<p
style=
"text-align: center; margin: 0px"
>
Size:
<span
id=
"value"
></span>
</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div
id=
"palette"
class=
"properties"
style=
"padding-top: 150px"
>
<div
id=
"palette"
class=
"properties"
style=
"padding-top: 150px"
>
...
...
This diff is collapsed.
Click to expand it.
public/styles.css
+
36
−
2
View file @
5c09cf3f
...
@@ -256,6 +256,40 @@ button.selected {
...
@@ -256,6 +256,40 @@ button.selected {
text-align
:
center
;
text-align
:
center
;
}
}
.properties
:palette
{
.slide-size
{
padding-top
:
50px
;
width
:
90%
;
height
:
20%
;
}
.slider
{
-webkit-appearance
:
none
;
appearance
:
none
;
width
:
100%
;
height
:
25px
;
background
:
#d3d3d3
;
outline
:
none
;
opacity
:
0.7
;
-webkit-transition
:
0.2s
;
transition
:
opacity
0.2s
;
margin-top
:
30px
;
}
.slider
:hover
{
opacity
:
1
;
}
.slider
::-webkit-slider-thumb
{
-webkit-appearance
:
none
;
appearance
:
none
;
width
:
25px
;
height
:
25px
;
background
:
#4f4f4f
;
cursor
:
pointer
;
}
.slider
::-moz-range-thumb
{
width
:
25px
;
height
:
25px
;
background
:
#4f4f4f
;
cursor
:
pointer
;
}
}
This diff is collapsed.
Click to expand it.
src/app.js
+
6
−
0
View file @
5c09cf3f
...
@@ -101,6 +101,12 @@ for (var i = 1; i < svg.length; i++) {
...
@@ -101,6 +101,12 @@ for (var i = 1; i < svg.length; i++) {
})
})
}
}
HTML
.
output
.
innerHTML
=
HTML
.
slider
.
value
HTML
.
slider
.
oninput
=
function
()
{
HTML
.
output
.
innerHTML
=
this
.
value
}
HTML
.
eraserButton
.
addEventListener
(
"
click
"
,
()
=>
{
HTML
.
eraserButton
.
addEventListener
(
"
click
"
,
()
=>
{
currentTool
=
tools
.
ERASER
currentTool
=
tools
.
ERASER
HTML
.
penButton
.
classList
.
remove
(
"
selected
"
)
HTML
.
penButton
.
classList
.
remove
(
"
selected
"
)
...
...
This diff is collapsed.
Click to expand it.
src/canvas.js
+
0
−
1
View file @
5c09cf3f
...
@@ -84,7 +84,6 @@ export const renderPath = (id, points) => {
...
@@ -84,7 +84,6 @@ export const renderPath = (id, points) => {
// Further split up segments based on thickness.
// Further split up segments based on thickness.
const
subpath_
=
subpath
.
slice
()
const
subpath_
=
subpath
.
slice
()
let
w
=
subpath_
[
0
][
2
]
let
w
=
subpath_
[
0
][
2
]
console
.
log
(
w
)
for
(
let
i
=
1
;
i
<
subpath_
.
length
;
i
++
)
{
for
(
let
i
=
1
;
i
<
subpath_
.
length
;
i
++
)
{
if
(
subpath_
[
i
][
2
]
!=
w
)
{
if
(
subpath_
[
i
][
2
]
!=
w
)
{
const
d
=
lineFn
([...
subpath_
.
splice
(
0
,
i
),
subpath_
[
0
]])
const
d
=
lineFn
([...
subpath_
.
splice
(
0
,
i
),
subpath_
[
0
]])
...
...
This diff is collapsed.
Click to expand it.
src/elements.js
+
2
−
0
View file @
5c09cf3f
...
@@ -20,3 +20,5 @@ export const span = document.querySelectorAll(".close")
...
@@ -20,3 +20,5 @@ export const span = document.querySelectorAll(".close")
export
const
palette
=
document
.
getElementById
(
"
palette
"
)
export
const
palette
=
document
.
getElementById
(
"
palette
"
)
export
const
rectangle
=
document
.
getElementById
(
"
rectangle
"
)
export
const
rectangle
=
document
.
getElementById
(
"
rectangle
"
)
export
const
wheel
=
document
.
getElementById
(
"
wheel
"
)
export
const
wheel
=
document
.
getElementById
(
"
wheel
"
)
export
const
slider
=
document
.
getElementById
(
"
range
"
)
export
const
output
=
document
.
getElementById
(
"
value
"
)
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