Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
EvolucionPIB
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
DESI_24-25
EvolucionPIB
Commits
3ce8b887
Commit
3ce8b887
authored
4 months ago
by
frajuar
Browse files
Options
Downloads
Patches
Plain Diff
final
parent
081374e2
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#12913
passed
4 months ago
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Js/script.js
+5
-6
5 additions, 6 deletions
Js/script.js
with
5 additions
and
6 deletions
Js/script.js
+
5
−
6
View file @
3ce8b887
...
...
@@ -114,16 +114,15 @@ function dibujaMapa(seleccionAnno) {
.
style
(
"
stroke
"
,
"
black
"
)
.
on
(
"
mouseover
"
,
function
(
event
,
d
){
const
centroid
=
path
.
centroid
(
d
);
let
textX
=
centroid
[
0
]
+
(
Math
.
random
()
*
20
-
10
);
// Aleatorizar un poco
let
textY
=
centroid
[
1
]
-
2
0
;
let
textX
=
centroid
[
0
]
+
15
;
let
textY
=
centroid
[
1
]
-
1
0
;
// Verificar si el texto se sale hacia la parte superior
if
(
textY
<
0
)
{
textY
=
2
0
;
// Mover el texto hacia abajo si está fuera por arriba
if
(
textY
<
1
0
)
{
textY
=
3
0
;
// Mover el texto hacia abajo si está fuera por arriba
}
// Verificar si el texto se sale hacia la parte inferior
if
(
textY
>
height
-
2
0
)
{
if
(
textY
>
height
-
1
0
)
{
textY
=
height
-
40
;
// Mover el texto hacia arriba si está fuera por abajo
}
...
...
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