Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
Blob Analysis Lab Ecole
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
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Benjamin BARDIAUX
Blob Analysis Lab Ecole
Commits
2a6d4b3a
Commit
2a6d4b3a
authored
2 years ago
by
Laurent Knoll
Browse files
Options
Downloads
Patches
Plain Diff
Amélioration de l'outil de contour de blob
parent
5a88356e
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/index.html
+10
-5
10 additions, 5 deletions
docs/index.html
with
10 additions
and
5 deletions
docs/index.html
+
10
−
5
View file @
2a6d4b3a
...
@@ -49,8 +49,8 @@
...
@@ -49,8 +49,8 @@
<div
class=
"card-body"
>
<div
class=
"card-body"
>
<p><span
class=
"badge rounded-pill text-bg-primary"
>
4
</span>
Entourer le blob en dessinant avec la souris.
</p>
<p><span
class=
"badge rounded-pill text-bg-primary"
>
4
</span>
Entourer le blob en dessinant avec la souris.
</p>
<p
class=
"text-muted"
>
Aire du blob :
<span
id=
"bl-area"
>
...
</span>
cm².
</p>
<p
class=
"text-muted"
>
Aire du blob :
<span
id=
"bl-area"
>
...
</span>
cm².
</p>
<button
id=
"bl-undo-blob"
type=
"button"
class=
"btn btn-primary"
>
Undo
</button>
<button
id=
"bl-undo-blob"
type=
"button"
class=
"btn btn-primary"
>
Défaire
</button>
<button
id=
"bl-clear-blob"
type=
"button"
class=
"btn btn-primary"
>
Effacer
</button>
<button
id=
"bl-clear-blob"
type=
"button"
class=
"btn btn-primary"
>
Effacer
tout
</button>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -140,6 +140,12 @@
...
@@ -140,6 +140,12 @@
paper
.
view
.
draw
();
paper
.
view
.
draw
();
}
}
let
undoBlobPath
=
function
()
{
if
(
blobPath
!=
null
&&
blobPath
.
segments
.
length
>
0
)
{
blobPath
.
removeSegments
(
Math
.
max
(
blobPath
.
segments
.
length
-
5
,
0
));
}
}
let
updateMeasures
=
function
()
{
let
updateMeasures
=
function
()
{
document
.
getElementById
(
"
bl-resolution
"
).
innerText
=
ruler
.
resolution
;
document
.
getElementById
(
"
bl-resolution
"
).
innerText
=
ruler
.
resolution
;
document
.
getElementById
(
"
bl-area
"
).
innerText
=
(
blobPath
.
area
/
ruler
.
resolution
).
toString
();
document
.
getElementById
(
"
bl-area
"
).
innerText
=
(
blobPath
.
area
/
ruler
.
resolution
).
toString
();
...
@@ -159,9 +165,7 @@
...
@@ -159,9 +165,7 @@
}
}
});
});
document
.
getElementById
(
"
bl-undo-blob
"
).
addEventListener
(
"
click
"
,
(
event
)
=>
{
document
.
getElementById
(
"
bl-undo-blob
"
).
addEventListener
(
"
click
"
,
(
event
)
=>
{
if
(
blobPath
!=
null
&&
blobPath
.
segments
.
length
>
0
)
{
undoBlobPath
();
blobPath
.
removeSegment
(
blobPath
.
segments
.
length
-
1
);
}
});
});
document
.
getElementById
(
"
bl-canvas
"
).
addEventListener
(
'
wheel
'
,
(
event
)
=>
{
document
.
getElementById
(
"
bl-canvas
"
).
addEventListener
(
'
wheel
'
,
(
event
)
=>
{
...
@@ -224,6 +228,7 @@
...
@@ -224,6 +228,7 @@
raster
.
onMouseDrag
=
function
(
event
)
{
raster
.
onMouseDrag
=
function
(
event
)
{
if
(
!
event
.
modifiers
.
shift
)
{
// Epêche de dessiner lors du déplacement de la vue
if
(
!
event
.
modifiers
.
shift
)
{
// Epêche de dessiner lors du déplacement de la vue
blobPath
.
add
(
event
.
point
);
blobPath
.
add
(
event
.
point
);
blobPath
.
smooth
({
type
:
'
continuous
'
});
updateMeasures
();
updateMeasures
();
}
}
}
}
...
...
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