Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
matefun
Frontend
Commits
ff290175
Commit
ff290175
authored
Sep 30, 2018
by
jose.ignacio.fagian
Browse files
fix 3d chart dissapear bug, fix click outside directive
parent
4dc37e1e
Changes
16
Expand all
Hide whitespace changes
Inline
Side-by-side
Frontend Angular 4/npm-debug.log
deleted
100644 → 0
View file @
4dc37e1e
This diff is collapsed.
Click to expand it.
Frontend Angular 4/package-lock.json
View file @
ff290175
...
...
@@ -3611,7 +3611,8 @@
"ansi-regex"
:
{
"version"
:
"2.1.1"
,
"bundled"
:
true
,
"dev"
:
true
"dev"
:
true
,
"optional"
:
true
},
"aproba"
:
{
"version"
:
"1.2.0"
,
...
...
@@ -3632,12 +3633,14 @@
"balanced-match"
:
{
"version"
:
"1.0.0"
,
"bundled"
:
true
,
"dev"
:
true
"dev"
:
true
,
"optional"
:
true
},
"brace-expansion"
:
{
"version"
:
"1.1.11"
,
"bundled"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"balanced-match"
:
"^1.0.0"
,
"concat-map"
:
"0.0.1"
...
...
@@ -3652,17 +3655,20 @@
"code-point-at"
:
{
"version"
:
"1.1.0"
,
"bundled"
:
true
,
"dev"
:
true
"dev"
:
true
,
"optional"
:
true
},
"concat-map"
:
{
"version"
:
"0.0.1"
,
"bundled"
:
true
,
"dev"
:
true
"dev"
:
true
,
"optional"
:
true
},
"console-control-strings"
:
{
"version"
:
"1.1.0"
,
"bundled"
:
true
,
"dev"
:
true
"dev"
:
true
,
"optional"
:
true
},
"core-util-is"
:
{
"version"
:
"1.0.2"
,
...
...
@@ -3779,7 +3785,8 @@
"inherits"
:
{
"version"
:
"2.0.3"
,
"bundled"
:
true
,
"dev"
:
true
"dev"
:
true
,
"optional"
:
true
},
"ini"
:
{
"version"
:
"1.3.5"
,
...
...
@@ -3791,6 +3798,7 @@
"version"
:
"1.0.0"
,
"bundled"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"number-is-nan"
:
"^1.0.0"
}
...
...
@@ -3805,6 +3813,7 @@
"version"
:
"3.0.4"
,
"bundled"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"brace-expansion"
:
"^1.1.7"
}
...
...
@@ -3812,12 +3821,14 @@
"minimist"
:
{
"version"
:
"0.0.8"
,
"bundled"
:
true
,
"dev"
:
true
"dev"
:
true
,
"optional"
:
true
},
"minipass"
:
{
"version"
:
"2.2.4"
,
"bundled"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"safe-buffer"
:
"^5.1.1"
,
"yallist"
:
"^3.0.0"
...
...
@@ -3836,6 +3847,7 @@
"version"
:
"0.5.1"
,
"bundled"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"minimist"
:
"0.0.8"
}
...
...
@@ -3916,7 +3928,8 @@
"number-is-nan"
:
{
"version"
:
"1.0.1"
,
"bundled"
:
true
,
"dev"
:
true
"dev"
:
true
,
"optional"
:
true
},
"object-assign"
:
{
"version"
:
"4.1.1"
,
...
...
@@ -3928,6 +3941,7 @@
"version"
:
"1.4.0"
,
"bundled"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"wrappy"
:
"1"
}
...
...
@@ -4013,7 +4027,8 @@
"safe-buffer"
:
{
"version"
:
"5.1.1"
,
"bundled"
:
true
,
"dev"
:
true
"dev"
:
true
,
"optional"
:
true
},
"safer-buffer"
:
{
"version"
:
"2.1.2"
,
...
...
@@ -4049,6 +4064,7 @@
"version"
:
"1.0.2"
,
"bundled"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"code-point-at"
:
"^1.0.0"
,
"is-fullwidth-code-point"
:
"^1.0.0"
,
...
...
@@ -4068,6 +4084,7 @@
"version"
:
"3.0.1"
,
"bundled"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"ansi-regex"
:
"^2.0.0"
}
...
...
@@ -4111,12 +4128,14 @@
"wrappy"
:
{
"version"
:
"1.0.2"
,
"bundled"
:
true
,
"dev"
:
true
"dev"
:
true
,
"optional"
:
true
},
"yallist"
:
{
"version"
:
"3.0.2"
,
"bundled"
:
true
,
"dev"
:
true
"dev"
:
true
,
"optional"
:
true
}
}
},
...
...
@@ -4390,13 +4409,6 @@
"integrity"
:
"sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg="
,
"dev"
:
true
},
"graph3D"
:
{
"version"
:
"git://github.com/ifagian/graph3D.git#79bb55dedbaf4e3b853f138acf4409b6bbcb4d07"
,
"from"
:
"git://github.com/ifagian/graph3D.git#master"
,
"requires"
:
{
"three"
:
"^0.90.0"
}
},
"handle-thing"
:
{
"version"
:
"1.2.5"
,
"resolved"
:
"https://registry.npmjs.org/handle-thing/-/handle-thing-1.2.5.tgz"
,
...
...
@@ -10297,11 +10309,6 @@
"execa"
:
"^0.7.0"
}
},
"three"
:
{
"version"
:
"0.90.0"
,
"resolved"
:
"https://registry.npmjs.org/three/-/three-0.90.0.tgz"
,
"integrity"
:
"sha512-sCTgOp/0ITLy0bsUoNeUROq2Tt1G0+StfRBs9ljFTENRF5JkKlTjZ+RWSH6qyq6O3c5fDKRupfuqZE/+LbETiA=="
},
"through"
:
{
"version"
:
"2.3.8"
,
"resolved"
:
"https://registry.npmjs.org/through/-/through-2.3.8.tgz"
,
...
...
Frontend Angular 4/package.json
View file @
ff290175
{
"name"
:
"
sb-admin-angular4-bootstrap4
"
,
"version"
:
"
1
.0.
0
"
,
"name"
:
"
matefun
"
,
"version"
:
"
2
.0.
1
"
,
"license"
:
"MIT"
,
"scripts"
:
{
"ng"
:
"ng"
,
...
...
Frontend Angular 4/src/app/layout/matefun/matefun.component.html
View file @
ff290175
...
...
@@ -2,7 +2,7 @@
<div
class=
"container-fluid"
style=
" padding-left: 0px; padding-right: 0px; margin-top: -13px; margin-left: -6px; margin-right: -6px;"
>
<div
class=
"row"
>
<div
class=
"col-md-6"
>
<ngb-tabset
[destroyOnHide]=
false
>
<ngb-tabset
[destroyOnHide]=
false
(tabChange)=
"onChangeTab($event)"
>
<ngb-tab
id=
"ProgramBtn"
title=
"Programa"
>
<ng-template
ngbTabContent
>
...
...
@@ -129,5 +129,6 @@
</div>
</div>
<span
class=
"version"
>
v{{version}}
</span>
</div>
Frontend Angular 4/src/app/layout/matefun/matefun.component.scss
View file @
ff290175
...
...
@@ -3,3 +3,8 @@
height
:
100%
!
important
;
}
.version
{
position
:
absolute
;
font-size
:
11px
;
right
:
0
;
}
\ No newline at end of file
Frontend Angular 4/src/app/layout/matefun/matefun.component.ts
View file @
ff290175
...
...
@@ -43,6 +43,8 @@ import 'codemirror/addon/edit/matchbrackets';
import
'
./codemirror/matefun-mode-ES.js
'
import
'
./codemirror/matefun-mode-EN.js
'
import
*
as
npm
from
'
./../../../../package.json
'
var
codeMirrorRef
:
any
;
var
componentRef
:
any
;
var
focus
:
any
;
...
...
@@ -89,7 +91,7 @@ export class MateFunComponent {
fontSize
:
12
};
themes
=
[
'
3024-day
'
,
'
3024-night
'
,
'
abcdef
'
,
'
ambiance-mobile
'
,
'
ambiance
'
,
'
base16-dark
'
,
'
base16-light
'
,
'
bespin
'
,
'
blackboard
'
,
'
cobalt
'
,
'
colorforth
'
,
'
dracula
'
,
'
duotone-dark
'
,
'
duotone-light
'
,
'
eclipse
'
,
'
elegant
'
,
'
erlang-dark
'
,
'
hopscotch
'
,
'
icecoder
'
,
'
isotope
'
,
'
lesser-dark
'
,
'
liquibyte
'
,
'
material
'
,
'
mbo
'
,
'
mdn-like
'
,
'
midnight
'
,
'
monokai
'
,
'
neat
'
,
'
neo
'
,
'
night
'
,
'
panda-syntax
'
,
'
paraiso-dark
'
,
'
paraiso-light
'
,
'
pastel-on-dark
'
,
'
railscasts
'
,
'
rubyblue
'
,
'
seti
'
,
'
solarized
'
,
'
the-matrix
'
,
'
tomorrow-night-bright
'
,
'
tomorrow-night-eighties
'
,
'
ttcn
'
,
'
twilight
'
,
'
vibrant-ink
'
,
'
xq-dark
'
,
'
xq-light
'
,
'
yeti
'
,
'
zenburn
'
]
version
:
string
=
npm
.
version
;
constructor
(
private
haskellService
:
HaskellService
,
...
...
@@ -605,6 +607,11 @@ export class MateFunComponent {
});
}
onChangeTab
(
event
)
{
if
(
event
.
nextId
==
'
FigurasBtn3D
'
)
{
this
.
graph3DComp
.
onActivate
();
}
}
}
Frontend Angular 4/src/app/layout/matefun/matefun.module.ts
View file @
ff290175
...
...
@@ -12,8 +12,6 @@ import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
import
{
NotificacionModule
}
from
'
../../notificacion/notificacion.module
'
;
import
{
Graph2DModule
}
from
'
../plotter/graph2D/graph2D.module
'
;
import
{
Graph3DModule
}
from
'
../plotter/graph3D/graph3D.module
'
;
import
{
ClosePopoverOnOutsideClickDirective
}
from
'
../../shared/utils/closePopoverDirective
'
;
@
NgModule
({
imports
:
[
...
...
@@ -35,8 +33,7 @@ import { ClosePopoverOnOutsideClickDirective } from '../../shared/utils/closePop
declarations
:
[
MateFunComponent
,
ConfirmComponent
,
SeleccionarDirectorioComp
,
ClosePopoverOnOutsideClickDirective
SeleccionarDirectorioComp
],
exports
:
[
MateFunComponent
]
})
...
...
Frontend Angular 4/src/app/layout/plotter/graph2D/graph2D.component.html
View file @
ff290175
...
...
@@ -38,7 +38,7 @@
<button
id=
"settings"
class=
"btn btn-sm btn-secondary btn-setting"
placement=
"bottom"
closePopover
OnOutsideClick
closePopover
Directive
[ngbPopover]=
popoverCanvas
popoverTitle=
"Configuración"
#popover
="
ngbPopover
"
...
...
Frontend Angular 4/src/app/layout/plotter/graph2D/graph2D.module.ts
View file @
ff290175
...
...
@@ -4,9 +4,10 @@ import { RouterModule } from '@angular/router';
import
{
NgbModule
}
from
'
@ng-bootstrap/ng-bootstrap
'
;
import
{
FormsModule
}
from
'
@angular/forms
'
;
import
{
Graph2DComponent
}
from
'
./graph2D.component
'
;
import
{
DirectivesModule
}
from
'
../../../shared/directives/directives.module
'
;
@
NgModule
({
imports
:
[
FormsModule
,
RouterModule
,
CommonModule
,
NgbModule
],
imports
:
[
FormsModule
,
RouterModule
,
CommonModule
,
NgbModule
,
DirectivesModule
],
declarations
:
[
Graph2DComponent
],
exports
:
[
Graph2DComponent
],
})
...
...
Frontend Angular 4/src/app/layout/plotter/graph3D/graph3D.component.html
View file @
ff290175
...
...
@@ -55,7 +55,7 @@
</button>
<button
closePopover
OnOutsideClick
closePopover
Directive
class=
"btn btn-sm btn-secondary"
placement=
"bottom"
[ngbPopover]=
popoverAxesSize
...
...
@@ -150,10 +150,9 @@
</button>
<button
[ngbPopover]=
popoverConfig
closePopover
OnOutsideClick
[ngbPopover]=
popoverConfig
closePopover
Directive
placement=
"bottom"
tiggers=
"click"
class=
"btn btn-sm btn-secondary"
popoverTitle=
"Configuración"
...
...
Frontend Angular 4/src/app/layout/plotter/graph3D/graph3D.component.ts
View file @
ff290175
...
...
@@ -28,21 +28,24 @@ export class Graph3DComponent implements AfterViewInit {
};
constructor
(
ghciService
:
GHCIService
,
private
zone
:
NgZone
)
{
const
self
=
this
;
this
.
ghciServiceSub
=
ghciService
.
messages
.
subscribe
(
message
=>
{
if
(
message
.
tipo
==
"
canvas3D
"
)
{
const
figures
=
JSON
.
parse
(
formatJSON
(
message
.
resultado
));
self
.
clear
();
graph3DLib
.
drawFigures
(
figures
);
}
else
if
(
message
.
tipo
==
"
animacion3D
"
)
{
const
frames
=
message
.
resultado
.
map
((
frame
)
=>
JSON
.
parse
(
formatJSON
(
frame
)));
self
.
clear
();
this
.
animationProps
.
visible
=
true
;
this
.
animationProps
.
playing
=
true
;
this
.
animationProps
.
value
=
0
;
graph3DLib
.
clear
();
graph3DLib
.
initializeAnimation
(
frames
,
(
value
)
=>
this
.
animationProps
.
value
=
value
);
...
...
@@ -54,14 +57,8 @@ export class Graph3DComponent implements AfterViewInit {
}
ngAfterViewInit
()
{
// this.zone.runOutsideAngular(() => {
graph3DLib
.
initialize
(
this
.
graph3DRef
.
nativeElement
,
true
);
(
function
render
()
{
console
.
info
(
"
ngAfterViewInit: ####### FIRED
"
);
//requestAnimationFrame(render);
graph3DLib
.
forceUpdateRenderer
();
}());
//this.zone.runOutsideAngular(() => {
graph3DLib
.
initialize
(
this
.
graph3DRef
.
nativeElement
);
//})
}
...
...
@@ -71,10 +68,17 @@ export class Graph3DComponent implements AfterViewInit {
}
}
onResize
(
event
){
const
{
width
,
height
}
=
this
.
graph3DRef
.
nativeElement
.
getBoundingClientRect
();
onActivate
()
{
setTimeout
(()
=>
{
this
.
onResize
(
null
);
})
}
graph3DLib
.
changeSize
({
width
,
height
});
onResize
(
event
){
const
{
width
,
height
}
=
this
.
graph3DRef
.
nativeElement
.
getBoundingClientRect
();
if
(
width
>
0
&&
height
>
0
)
graph3DLib
.
changeSize
({
width
,
height
});
}
onAnimationChangeSpeed
=
(
value
)
=>
{
...
...
Frontend Angular 4/src/app/layout/plotter/graph3D/graph3D.module.ts
View file @
ff290175
...
...
@@ -5,10 +5,11 @@ import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
import
{
FormsModule
}
from
'
@angular/forms
'
;
import
{
Graph3DComponent
}
from
'
./graph3D.component
'
;
import
{
AnimationControlComponent
}
from
'
../animation-control/animation-control.component
'
;
import
{
DirectivesModule
}
from
'
../../../shared/directives/directives.module
'
;
@
NgModule
({
imports
:
[
FormsModule
,
RouterModule
,
CommonModule
,
NgbModule
],
imports
:
[
FormsModule
,
RouterModule
,
CommonModule
,
NgbModule
,
DirectivesModule
],
declarations
:
[
AnimationControlComponent
,
Graph3DComponent
...
...
Frontend Angular 4/src/app/shared/
util
s/closePopover
D
irective.ts
→
Frontend Angular 4/src/app/shared/
directive
s/closePopover
.d
irective.ts
View file @
ff290175
...
...
@@ -3,9 +3,9 @@ import { NgbPopover } from '@ng-bootstrap/ng-bootstrap';
import
{
NgbPopoverWindow
}
from
'
@ng-bootstrap/ng-bootstrap/popover/popover
'
;
@
Directive
({
selector
:
'
[closePopover
OnOutsideClick
][ngbPopover]
'
selector
:
'
[closePopover
Directive
][ngbPopover]
'
})
export
class
ClosePopover
OnOutsideClick
Directive
{
export
class
ClosePopoverDirective
{
constructor
(
private
elementRef
:
ElementRef
,
private
ngbPopover
:
NgbPopover
)
{
...
...
Frontend Angular 4/src/app/shared/directives/directives.module.ts
0 → 100644
View file @
ff290175
import
{
NgModule
}
from
'
@angular/core
'
;
import
{
ClosePopoverDirective
}
from
'
./closePopover.directive
'
;
@
NgModule
({
imports
:
[],
declarations
:
[
ClosePopoverDirective
],
exports
:
[
ClosePopoverDirective
]
})
export
class
DirectivesModule
{
}
Frontend Angular 4/src/typings.d.ts
View file @
ff290175
...
...
@@ -3,3 +3,5 @@ declare var module: NodeModule;
interface
NodeModule
{
id
:
string
;
}
declare
module
'
*.json
'
;
\ No newline at end of file
Frontend Angular 4/tsconfig.json
View file @
ff290175
...
...
@@ -10,7 +10,8 @@
"experimentalDecorators"
:
true
,
"target"
:
"es5"
,
"typeRoots"
:
[
"node_modules/@types"
"node_modules/@types"
,
"./src/typings.d.ts"
],
"lib"
:
[
"es2016"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment