Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
Frontend
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
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
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
matefun
Frontend
Commits
c39e6782
Commit
c39e6782
authored
6 years ago
by
Leonel Rosano Montero
Browse files
Options
Downloads
Patches
Plain Diff
Agrega la funcionalidad de Enmuerados
parent
785f5e5c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Frontend Angular 4/src/app/layout/plotter/graph2D/graph2D.component.ts
+18
-14
18 additions, 14 deletions
...lar 4/src/app/layout/plotter/graph2D/graph2D.component.ts
with
18 additions
and
14 deletions
Frontend Angular 4/src/app/layout/plotter/graph2D/graph2D.component.ts
+
18
−
14
View file @
c39e6782
...
...
@@ -53,7 +53,7 @@ export class Graph2DComponent {
public
setZoom
=
()
=>
{
this
.
animation
.
zoo
=
this
.
animation
.
zoo
;
this
.
animation
.
zoo
=
this
.
animation
.
zoo
;
}
public
multiGraf
=
()
=>
{
this
.
animation
.
boton
=
!
this
.
animation
.
boton
;
...
...
@@ -68,7 +68,6 @@ export class Graph2DComponent {
switch
(
canvas
.
tipo
)
{
case
'
graph
'
:
{
var
jsonCanvas
=
JSON
.
parse
(
canvas
.
resultado
);
let
fun
=
eval
(
this
.
generarFuncion
(
jsonCanvas
));
var
conjs
=
this
.
obtenerConjunto
(
jsonCanvas
.
funs
[
0
]);
var
d
=
conjs
+
"
}
"
;
//Leo
...
...
@@ -85,26 +84,31 @@ export class Graph2DComponent {
var
elemento2
=
this
.
recursionfuncion
(
jsonCanvas
.
funs
[
0
].
sets
,
nom
);
obj
.
conj
.
sets
.
fcod
=
function
(
x
)
{
return
(
eval
(
elemento2
))
}
}
var
funcionGenerada
=
this
.
generarFuncion
(
jsonCanvas
);
console
.
log
(
obj
)
//para Enumerados
if
(
obj
.
conj
.
dom
==
'
Numer
'
)
{
var
cantElementos
=
obj
.
conj
.
sets
.
fdom
.
length
;
var
j
=
0
;
for
(
var
fun
of
obj
.
conj
.
sets
.
fdom
)
{
//var newstr = nuevo2.replace(fun, j);
j
=
j
+
1
;
for
(
var
f
of
obj
.
conj
.
sets
.
fdom
)
{
var
expresionDom
=
new
RegExp
(
'
(
'
+
f
+
'
)
'
,
'
g
'
);
funcionGenerada
=
funcionGenerada
.
replace
(
expresionDom
,
j
.
toString
());
j
+=
1
;
}
}
if
(
obj
.
conj
.
cod
==
'
Numer
'
)
{
var
cantElementos
=
obj
.
conj
.
sets
.
fcod
.
length
;
var
j
=
0
;
for
(
var
fun
of
obj
.
conj
.
sets
.
fcod
)
{
//var newstr = nuevo2.replace(fun, j
);
j
=
j
+
1
;
var
j2
=
0
;
for
(
var
f2
of
obj
.
conj
.
sets
.
fcod
)
{
var
expresionCod
=
new
RegExp
(
f2
,
'
g
'
);
funcionGenerada
=
funcionGenerada
.
replace
(
expresionCod
,
j2
.
toString
()
);
j
2
+
=
1
;
}
}
let
fun
=
eval
(
funcionGenerada
);
var
colores
=
[
'
pink
'
,
'
red
'
,
'
blue
'
,
'
orange
'
,
'
green
'
]
var
num
=
this
.
getRandomArbitrary
(
0
,
4
);
var
color
=
colores
[
num
];
...
...
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