Commit 40933198 authored by Ignacio Fagian's avatar Ignacio Fagian
Browse files

Soporte para firefox, tooltips warnings

parent ef8ef4f1
...@@ -23,12 +23,12 @@ ...@@ -23,12 +23,12 @@
"@ng-bootstrap/ng-bootstrap": "1.0.0-alpha.26", "@ng-bootstrap/ng-bootstrap": "1.0.0-alpha.26",
"@ngx-translate/core": "^7.2.2", "@ngx-translate/core": "^7.2.2",
"@ngx-translate/http-loader": "^0.1.0", "@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", "core-js": "^2.4.1",
"d3": "^4.12.2", "d3": "^4.12.2",
"flag-icon-css": "^3.2.1", "flag-icon-css": "^3.2.1",
"font-awesome": "^4.7.0", "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", "ionicons": "^3.0.0",
"jq-console": "^2.13.2", "jq-console": "^2.13.2",
"jquery": "^3.2.1", "jquery": "^3.2.1",
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
"ng2-slider-component": "^1.0.9", "ng2-slider-component": "^1.0.9",
"rxjs": "^5.1.0", "rxjs": "^5.1.0",
"tippy.js": "^1.2.0", "tippy.js": "^1.2.0",
"web-animations-js": "^2.3.1",
"zone.js": "^0.8.4" "zone.js": "^0.8.4"
}, },
"devDependencies": { "devDependencies": {
......
...@@ -84,10 +84,11 @@ export class Graph3DComponent implements AfterViewInit { ...@@ -84,10 +84,11 @@ export class Graph3DComponent implements AfterViewInit {
} }
onResize(event){ onResize(event){
const {width, height} = this.graph3DRef.nativeElement.getBoundingClientRect(); const {width, height} = this.graph3DRef.nativeElement.getBoundingClientRect();
if (width > 0 && height > 0) if (width > 0 && height > 0) {
graph3DLib.changeSize({width, height}); graph3DLib.changeSize({width, height});
}
} }
onAnimationChangeSpeed = (value) => { onAnimationChangeSpeed = (value) => {
......
...@@ -186,10 +186,10 @@ export class GHCIService { ...@@ -186,10 +186,10 @@ export class GHCIService {
var line = this.lastWarning; var line = this.lastWarning;
var title = this.warningText; 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 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){ if(this.codemirrorRef!==null){
var makeMarker = function() { var makeMarker = function() {
...@@ -215,16 +215,21 @@ export class GHCIService { ...@@ -215,16 +215,21 @@ export class GHCIService {
if(this.warningStepReaded===0){ if(this.warningStepReaded===0){
try{ 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.lastWarning = line;
this.warnings.push(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.warningStepReaded = 1;
this.warningText = warningText; this.warningText = warningText;
if(this.waitingForWarning){ if(this.waitingForWarning){
this.outputConsole('El programa contiene advertencias\n'); this.outputConsole(`${this.translateService.get('i18n.msg.codemirror.consoleWarnings').value}\n`);
this.waitingForWarning = false; this.waitingForWarning = false;
} }
......
...@@ -80,7 +80,8 @@ ...@@ -80,7 +80,8 @@
"infixOperatorsWarnings" : "Show warnings of use of infix operators", "infixOperatorsWarnings" : "Show warnings of use of infix operators",
"cursorPosition" : "Cursor position", "cursorPosition" : "Cursor position",
"showHints" : "Show autocomplete hints", "showHints" : "Show autocomplete hints",
"functionTyping" : "Show functions typing" "functionTyping" : "Show functions typing",
"consoleWarnings": "Program contains warnings"
}, },
"figure" : { "figure" : {
"multiPlot" : "Multi graph", "multiPlot" : "Multi graph",
......
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
"inLine" : "en línea", "inLine" : "en línea",
"column" : "columna", "column" : "columna",
"inColumn" : "En columna", "inColumn" : "En columna",
"line" : "línea", "line" : "linea",
"outWarning" : "OUTAdvertencia" "outWarning" : "OUTAdvertencia"
} }
}, },
...@@ -80,7 +80,8 @@ ...@@ -80,7 +80,8 @@
"infixOperatorsWarnings" : "Mostrar advertencias de uso de operadores infijos", "infixOperatorsWarnings" : "Mostrar advertencias de uso de operadores infijos",
"cursorPosition" : "Posición del cursor", "cursorPosition" : "Posición del cursor",
"showHints" : "Mostrar sugerencias de autocompletar", "showHints" : "Mostrar sugerencias de autocompletar",
"functionTyping" : "Mostrar tipado de funciones" "functionTyping" : "Mostrar tipado de funciones",
"consoleWarnings": "El programa contiene advertencias"
}, },
"figure" : { "figure" : {
"multiPlot" : "Multi gráfica", "multiPlot" : "Multi gráfica",
......
...@@ -19,19 +19,19 @@ ...@@ -19,19 +19,19 @@
*/ */
/** IE9, IE10 and IE11 requires all of the following polyfills. **/ /** IE9, IE10 and IE11 requires all of the following polyfills. **/
// import 'core-js/es6/symbol'; import 'core-js/es6/symbol';
// import 'core-js/es6/object'; import 'core-js/es6/object';
// import 'core-js/es6/function'; import 'core-js/es6/function';
// import 'core-js/es6/parse-int'; import 'core-js/es6/parse-int';
// import 'core-js/es6/parse-float'; import 'core-js/es6/parse-float';
// import 'core-js/es6/number'; import 'core-js/es6/number';
// import 'core-js/es6/math'; import 'core-js/es6/math';
// import 'core-js/es6/string'; import 'core-js/es6/string';
// import 'core-js/es6/date'; import 'core-js/es6/date';
// import 'core-js/es6/array'; import 'core-js/es6/array';
// import 'core-js/es6/regexp'; import 'core-js/es6/regexp';
// import 'core-js/es6/map'; import 'core-js/es6/map';
// import 'core-js/es6/set'; import 'core-js/es6/set';
/** IE10 and IE11 requires the following for NgClass support on SVG elements */ /** IE10 and IE11 requires the following for NgClass support on SVG elements */
// import 'classlist.js'; // Run `npm install --save classlist.js`. // import 'classlist.js'; // Run `npm install --save classlist.js`.
...@@ -46,7 +46,7 @@ import 'core-js/es7/reflect'; ...@@ -46,7 +46,7 @@ import 'core-js/es7/reflect';
/** ALL Firefox browsers require the following to support `@angular/animation`. **/ /** 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`.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment