Skip to content
Snippets Groups Projects
Commit d7cba3ba authored by Diego Rey's avatar Diego Rey
Browse files

Fixed Graph2D component namespace

parent 9c418d5f
No related branches found
No related tags found
No related merge requests found
Showing
with 479 additions and 47 deletions
This diff is collapsed.
......@@ -74,22 +74,22 @@
</ng-template>
</ngb-tab>
<ngb-tab id="FigurasBtn" title="Figuras">
<ngb-tab id="FigurasBtn" title="Figuras OLD">
<ng-template ngbTabContent>
<canvas-component (canvasComp)=canvasC></canvas-component>
</ng-template>
</ngb-tab>
<ngb-tab id="FigurasBtn2" title="Figuras 3D">
</ngb-tab>
<ngb-tab id="FigurasBtn2" title="Figuras 2D">
<ng-template ngbTabContent>
<graph3d-component (graph3DComp)=graph3DComp></graph3d-component>
<graph2D-component (graph2DComp)=graph2DComp></graph2D-component>
</ng-template>
</ngb-tab>
<ngb-tab id="FigurasBtn2" title="Figuras New">
<ngb-tab id="FigurasBtn3" title="Figuras 3D">
<ng-template ngbTabContent>
<plotter-component (plotterComp)=plotterC></plotter-component>
<graph3d-component (graph3DComp)=graph3DComp></graph3d-component>
</ng-template>
</ngb-tab>
</ngb-tabset>
</div>
......
import { Component, NgModule, ViewChild, HostListener, ElementRef, ComponentRef, TemplateRef } from '@angular/core';
import { CanvasModule} from '../canvas/canvas.module';
import { CanvasComponent } from '../canvas/canvas.component';
import { PlotterModule } from '../plotter/plotter.module';
import { PlotterComponent } from '../plotter/plotter.component';
import { Http, JsonpModule } from '@angular/http';
import { Headers, RequestOptions } from '@angular/http';
import { HaskellService } from '../../shared/services/haskell.service';
......@@ -21,6 +19,8 @@ import { CodemirrorComponent } from 'ng2-codemirror';
import { NgbPopoverConfig, NgbPopover} from '@ng-bootstrap/ng-bootstrap';
import { NgbPopoverWindow } from '@ng-bootstrap/ng-bootstrap/popover/popover';
import { NotificacionService } from '../../shared/services/notificacion.service';
import { Graph2DModule } from '../plotter/graph2D/graph2D.module';
import { Graph2DComponent } from '../plotter/graph2D/graph2D.component';
import { Graph3DComponent } from '../plotter/graph3D/graph3D.component';
import 'rxjs/add/operator/catch';
......@@ -356,7 +356,7 @@ export class MateFunComponent {
@ViewChild(CanvasComponent) canvasC: CanvasComponent;
@ViewChild(Graph3DComponent) graph3DComp: Graph3DComponent;
@ViewChild(PlotterComponent) plotterC: PlotterComponent;
@ViewChild(Graph2DComponent) graph2DComp: Graph2DComponent;
funcionSTR: string = 'Math.sin(x)*x*x-20';
consola: string = '';
......
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { CanvasModule } from '../canvas/canvas.module'
import { PlotterModule } from '../plotter/plotter.module'
import { MateFunComponent } from './matefun.component';
import { BootstrapModalModule } from 'ng2-bootstrap-modal';
import { ConfirmComponent } from './confirm.component';
......@@ -10,7 +9,8 @@ import { CommonModule } from '@angular/common';
import { MateFunRoutingModule } from './matefun-routing.module';
import { CodemirrorModule } from 'ng2-codemirror';
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
import { NotificacionModule } from '../../notificacion/notificacion.module';
import { NotificacionModule } from '../../notificacion/notificacion.module';
import { Graph2DModule } from '../plotter/graph2D/graph2D.module';
import { Graph3DModule } from '../plotter/graph3D/graph3D.module';
@NgModule({
......@@ -18,7 +18,7 @@ import { Graph3DModule } from '../plotter/graph3D/graph3D.module';
CommonModule,
FormsModule,
CanvasModule,
PlotterModule,
Graph2DModule,
Graph3DModule,
NotificacionModule,
MateFunRoutingModule,
......
<div class="card">
<div class="card-block contenedor-canvas" >
<div id="plotter-container" style="height: 100%; width: 100%;">
<div id="graph2D-container" style="height: 100%; width: 100%;">
</div>
</div>
</div>
\ No newline at end of file
import { Component } from '@angular/core';
import { GHCIService } from '../../shared/services/ghci.service';
import { GHCIService } from '../../../shared/services/ghci.service';
import functionPlot from 'function-plot';
@Component({
moduleId: module.id,
selector: 'plotter-component',
templateUrl: './plotter.component.html',
selector: 'graph2D-component',
templateUrl: './graph2D.component.html',
host: {
}
})
export class PlotterComponent {
export class Graph2DComponent {
public constructor(private ghciService: GHCIService) {
ghciService.messages.subscribe(
canvas=>{
......@@ -20,7 +20,7 @@ export class PlotterComponent {
functionPlot({
target: '#plotter-container',
target: '#graph2D-container',
width: 770,
height: 720,
tip: {
......@@ -44,7 +44,7 @@ export class PlotterComponent {
})
// functionPlot({
// target: '#plotter-container',
// target: '#graph2D-container',
// width: 620,
// height: 450,
// data: [{
......
......@@ -3,12 +3,12 @@ import { CommonModule } from '@angular/common'
import { RouterModule } from '@angular/router';
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
import { FormsModule } from '@angular/forms';
import { PlotterComponent } from './plotter.component';
import { Graph2DComponent } from './graph2D.component';
@NgModule({
imports: [FormsModule, RouterModule, CommonModule, NgbModule],
declarations: [PlotterComponent],
exports: [PlotterComponent]
declarations: [Graph2DComponent],
exports: [Graph2DComponent]
})
export class PlotterModule { }
\ No newline at end of file
export class Graph2DModule { }
\ No newline at end of file
import { Route } from '@angular/router';
import { Graph2DComponent } from '.';
export const Graph2DRoutes: Route[] = [
{
path: 'graph2D',
component: Graph2DComponent
}
];
/**
* This barrel file provides the export for the lazy loaded BlankpageComponent.
*/
export * from './plotter.component';
export * from './graph2D.component';
export * from './plotter.routes';
export * from './graph2D.routes';
import { Route } from '@angular/router';
import { PlotterComponent } from './index';
export const PlotterRoutes: Route[] = [
{
path: 'plotter',
component: PlotterComponent
}
];
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment