Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
EstadisticasClubBaloncesto
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
EstadisticasClubBaloncesto
Commits
eebbf87f
Commit
eebbf87f
authored
4 months ago
by
rodpena
Browse files
Options
Downloads
Patches
Plain Diff
commit checkBox jugadores js
parent
f7e29772
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
script.js
+27
-5
27 additions, 5 deletions
script.js
styles.css
+1
-1
1 addition, 1 deletion
styles.css
with
28 additions
and
6 deletions
script.js
+
27
−
5
View file @
eebbf87f
...
...
@@ -89,7 +89,7 @@ function cargarJugadoresDesdeArchivo() {
// Limpia cualquier contenido previo
ladoIzquierdo
.
selectAll
(
"
*
"
).
remove
();
// Configuración del contenedor
para que los elementos hijos se distribuyan uniformemente
// Configuración del contenedor
ladoIzquierdo
.
style
(
"
display
"
,
"
flex
"
)
.
style
(
"
flex-direction
"
,
"
column
"
)
...
...
@@ -111,15 +111,37 @@ function cargarJugadoresDesdeArchivo() {
.
style
(
"
color
"
,
"
#000
"
)
// Color de texto
.
style
(
"
display
"
,
"
flex
"
)
// Para alinear el contenido
.
style
(
"
align-items
"
,
"
center
"
)
// Centrar contenido verticalmente
.
style
(
"
justify-content
"
,
"
center
"
)
// Centrar contenido horizontal
ment
e
.
style
(
"
justify-content
"
,
"
space-between
"
)
// Espacio entre los ele
ment
os
.
each
(
function
(
d
)
{
// Mostrar
solo
el número
y nombre
del jugador
// Mostrar el número del jugador
en el lado izquierdo
d3
.
select
(
this
)
.
append
(
"
div
"
)
.
attr
(
"
class
"
,
"
jugador-n
ombre
"
)
.
attr
(
"
class
"
,
"
jugador-n
umero
"
)
.
style
(
"
font-weight
"
,
"
bold
"
)
.
style
(
"
font-size
"
,
"
1.2em
"
)
.
text
(
`
${
d
.
Nº
}
.
${
d
.
Nombre
}
`
);
.
style
(
"
flex
"
,
"
0 0 auto
"
)
// Mantiene el número fijo en la izquierda
.
style
(
"
text-align
"
,
"
left
"
)
.
text
(
`
${
d
.
Nº
}
º`
);
// Mostrar el nombre del jugador
d3
.
select
(
this
)
.
append
(
"
div
"
)
.
attr
(
"
class
"
,
"
jugador-nombre
"
)
.
style
(
"
font-size
"
,
"
1.2em
"
)
.
style
(
"
text-align
"
,
"
center
"
)
.
style
(
"
flex
"
,
"
1
"
)
// Permite que el nombre ocupe el resto del espacio
.
text
(
d
.
Nombre
);
// Añadir un checkbox a la derecha
d3
.
select
(
this
)
.
append
(
"
input
"
)
.
attr
(
"
type
"
,
"
checkbox
"
)
.
attr
(
"
class
"
,
"
jugador-checkbox
"
)
// Clase para aplicar estilos
.
style
(
"
flex
"
,
"
0 0 auto
"
)
// No permite que se expanda
.
style
(
"
width
"
,
"
20px
"
)
// Ancho del checkbox
.
style
(
"
height
"
,
"
20px
"
)
// Alto del checkbox
.
style
(
"
border-radius
"
,
"
50%
"
)
// Hace que sea circular
.
style
(
"
cursor
"
,
"
pointer
"
);
// Cambia el cursor a pointer
});
});
}
...
...
This diff is collapsed.
Click to expand it.
styles.css
+
1
−
1
View file @
eebbf87f
...
...
@@ -132,7 +132,7 @@ body {
justify-content
:
center
;
font-weight
:
bold
;
font-size
:
1.2em
;
}
}
}
/* Div derecho (ocupa el resto del espacio) */
...
...
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