diff --git a/Frontend Angular 4/package.json b/Frontend Angular 4/package.json index b2605e1907836c13de998db98667cc4055a38580..aedf167b98f329ee166755c398f9bbc3c8dfd0c6 100755 --- a/Frontend Angular 4/package.json +++ b/Frontend Angular 4/package.json @@ -23,12 +23,12 @@ "@ng-bootstrap/ng-bootstrap": "1.0.0-alpha.26", "@ngx-translate/core": "^7.2.2", "@ngx-translate/http-loader": "^0.1.0", + "function-plot": "git://github.com/diego-rey/function-plot.git#feature/discontinuidades", + "graph3D": "git://github.com/ifagian/graph3D#master", "core-js": "^2.4.1", "d3": "^4.12.2", "flag-icon-css": "^3.2.1", "font-awesome": "^4.7.0", - "function-plot": "git://github.com/diego-rey/function-plot.git#feature/integration-multigraf-shape", - "graph3D": "git://github.com/ifagian/graph3D#master", "ionicons": "^3.0.0", "jq-console": "^2.13.2", "jquery": "^3.2.1", @@ -38,6 +38,7 @@ "ng2-slider-component": "^1.0.9", "rxjs": "^5.1.0", "tippy.js": "^1.2.0", + "web-animations-js": "^2.3.1", "zone.js": "^0.8.4" }, "devDependencies": { diff --git a/Frontend Angular 4/src/app/layout/plotter/graph3D/graph3D.component.ts b/Frontend Angular 4/src/app/layout/plotter/graph3D/graph3D.component.ts index 1497584f994f1f2b41d24bb7505eba2f9728cd84..3ea6aabb835b68e77ee19961e43bc76c4f9ab48b 100644 --- a/Frontend Angular 4/src/app/layout/plotter/graph3D/graph3D.component.ts +++ b/Frontend Angular 4/src/app/layout/plotter/graph3D/graph3D.component.ts @@ -84,10 +84,11 @@ export class Graph3DComponent implements AfterViewInit { } onResize(event){ - const {width, height} = this.graph3DRef.nativeElement.getBoundingClientRect(); - - if (width > 0 && height > 0) - graph3DLib.changeSize({width, height}); + const {width, height} = this.graph3DRef.nativeElement.getBoundingClientRect(); + + if (width > 0 && height > 0) { + graph3DLib.changeSize({width, height}); + } } onAnimationChangeSpeed = (value) => { diff --git a/Frontend Angular 4/src/app/shared/services/ghci.service.ts b/Frontend Angular 4/src/app/shared/services/ghci.service.ts index 86c757f0b81a5bf390bae5bd71f3c1198869a828..c8f7e0e1142a0449aed97facea920942789a8fdb 100755 --- a/Frontend Angular 4/src/app/shared/services/ghci.service.ts +++ b/Frontend Angular 4/src/app/shared/services/ghci.service.ts @@ -186,10 +186,10 @@ export class GHCIService { var line = this.lastWarning; var title = this.warningText; - var columna = title.split("columna:")[1].split("}")[0]; + var columna = title.split(`${this.translateService.get('i18n.codemirror.command.column').value}:`)[1].split("}")[0]; var warningTextToShow = title.split("}")[1]; - var warningFinalText = "En columna " + columna + ": " + warningTextToShow; + var warningFinalText = `${this.translateService.get('i18n.codemirror.command.inColumn').value}` + columna + ": " + warningTextToShow; if(this.codemirrorRef!==null){ var makeMarker = function() { @@ -215,16 +215,21 @@ export class GHCIService { if(this.warningStepReaded===0){ try{ + // retrive line of warning + var line = m.resultado + .split(`${this.translateService.get('i18n.codemirror.command.outWarning').value}:`)[1] + .trim() + .split(`${this.translateService.get('i18n.codemirror.command.line').value}:`)[1] + .split(" ")[1]-1; - var line = m.resultado.split("OUTAdvertencia:")[1].trim().split("lÃnea:")[1].split(" ")[1]-1; this.lastWarning = line; this.warnings.push(line); - var warningText = m.resultado.split("OUTAdvertencia:")[1].trim(); + var warningText = m.resultado.split(`${this.translateService.get('i18n.codemirror.command.outWarning').value}:`)[1].trim(); this.warningStepReaded = 1; this.warningText = warningText; if(this.waitingForWarning){ - this.outputConsole('El programa contiene advertencias\n'); + this.outputConsole(`${this.translateService.get('i18n.msg.codemirror.consoleWarnings').value}\n`); this.waitingForWarning = false; } diff --git a/Frontend Angular 4/src/assets/i18n/en.json b/Frontend Angular 4/src/assets/i18n/en.json index 87fb427ef1a4d2abd1aa01ab84dc88d809367abf..e3a3cdcb18e05100af31ce4228ca5508cfd5693b 100644 --- a/Frontend Angular 4/src/assets/i18n/en.json +++ b/Frontend Angular 4/src/assets/i18n/en.json @@ -80,7 +80,8 @@ "infixOperatorsWarnings" : "Show warnings of use of infix operators", "cursorPosition" : "Cursor position", "showHints" : "Show autocomplete hints", - "functionTyping" : "Show functions typing" + "functionTyping" : "Show functions typing", + "consoleWarnings": "Program contains warnings" }, "figure" : { "multiPlot" : "Multi graph", diff --git a/Frontend Angular 4/src/assets/i18n/es.json b/Frontend Angular 4/src/assets/i18n/es.json index 3365760bd658978a9bbca49b156fed6adf642fb2..e0013a7c280576ab3682e0a6b3cf711f1a9c0b3f 100644 --- a/Frontend Angular 4/src/assets/i18n/es.json +++ b/Frontend Angular 4/src/assets/i18n/es.json @@ -64,7 +64,7 @@ "inLine" : "en lÃnea", "column" : "columna", "inColumn" : "En columna", - "line" : "lÃnea", + "line" : "linea", "outWarning" : "OUTAdvertencia" } }, @@ -80,7 +80,8 @@ "infixOperatorsWarnings" : "Mostrar advertencias de uso de operadores infijos", "cursorPosition" : "Posición del cursor", "showHints" : "Mostrar sugerencias de autocompletar", - "functionTyping" : "Mostrar tipado de funciones" + "functionTyping" : "Mostrar tipado de funciones", + "consoleWarnings": "El programa contiene advertencias" }, "figure" : { "multiPlot" : "Multi gráfica", diff --git a/Frontend Angular 4/src/polyfills.ts b/Frontend Angular 4/src/polyfills.ts index 53bdaf1b86424df5230596f8352e78e4a4de66f5..f989042f10d1f5f98caf8e83543cb261d7413ec0 100755 --- a/Frontend Angular 4/src/polyfills.ts +++ b/Frontend Angular 4/src/polyfills.ts @@ -19,19 +19,19 @@ */ /** IE9, IE10 and IE11 requires all of the following polyfills. **/ -// import 'core-js/es6/symbol'; -// import 'core-js/es6/object'; -// import 'core-js/es6/function'; -// import 'core-js/es6/parse-int'; -// import 'core-js/es6/parse-float'; -// import 'core-js/es6/number'; -// import 'core-js/es6/math'; -// import 'core-js/es6/string'; -// import 'core-js/es6/date'; -// import 'core-js/es6/array'; -// import 'core-js/es6/regexp'; -// import 'core-js/es6/map'; -// import 'core-js/es6/set'; +import 'core-js/es6/symbol'; +import 'core-js/es6/object'; +import 'core-js/es6/function'; +import 'core-js/es6/parse-int'; +import 'core-js/es6/parse-float'; +import 'core-js/es6/number'; +import 'core-js/es6/math'; +import 'core-js/es6/string'; +import 'core-js/es6/date'; +import 'core-js/es6/array'; +import 'core-js/es6/regexp'; +import 'core-js/es6/map'; +import 'core-js/es6/set'; /** IE10 and IE11 requires the following for NgClass support on SVG elements */ // import 'classlist.js'; // Run `npm install --save classlist.js`. @@ -46,7 +46,7 @@ import 'core-js/es7/reflect'; /** ALL Firefox browsers require the following to support `@angular/animation`. **/ -// import 'web-animations-js'; // Run `npm install --save web-animations-js`. +import 'web-animations-js'; // Run `npm install --save web-animations-js`.