Commit ac8a7991 authored by Gonzalo Fabian Cameto Hernandez's avatar Gonzalo Fabian Cameto Hernandez
Browse files

Slider para intervalo de animación

parent 60de8eea
......@@ -28,6 +28,7 @@
"jquery": "^3.2.1",
"ng2-bootstrap-modal": "^1.0.1",
"ng2-codemirror": "^1.1.1",
"ng2-slider-component": "^1.0.9",
"rxjs": "^5.1.0",
"tippy.js": "^1.2.0",
"zone.js": "^0.8.4"
......
......@@ -41,7 +41,11 @@
<button class="btn btn-sm btn-secondary" data-placement="bottom" *ngIf="!animando && elementosAnimacion.length>0" style=" float:left; margin-top: -5px; margin-right: 5px" (click)="play()" ><i class="fa fa-play"></i></button>
<button class="btn btn-sm btn-secondary" data-placement="bottom" *ngIf="animando && elementosAnimacion.length>0" style=" float:left; margin-top: -5px; margin-right: 5px" (click)="pause()" ><i class="fa fa-pause"></i></button>
<ngb-progressbar style="float: none" *ngIf="elementosAnimacion.length>0" type="info" [value]="((frameAnimacion+1)/elementosAnimacion.length)*100"></ngb-progressbar>
<ngb-progressbar style="float: left; width: 45%" *ngIf="elementosAnimacion.length>0" type="info" [value]="((frameAnimacion+1)/elementosAnimacion.length)*100"></ngb-progressbar>
<span style="float: right; margin-left: 10px" *ngIf="elementosAnimacion.length>0"> {{timer}}ms</span>
<input style="float: right; width: 20%" *ngIf="elementosAnimacion.length>0" type="range" min="40" max="1500" [value]="timer" (input)="timer = $event.target.value" />
<canvas #canvasElement width="2000" height="2000" style="max-width: 100%;" (mousemove)="moveGraph($event)" (touchmove)="moveGraph($event)" (touchstart)="moveGraph($event)" (touchend)="moveGraph($event)" (mouseleave)="leaveCanvas($event)" (mousewheel)="zoomGraph($event)" (DOMMouseScroll)="zoomGraph($event)" id="myCanvas">
</canvas>
......
......@@ -52,7 +52,12 @@ export class CanvasComponent {
tipoZoom = "Todo";
tipoZoomDesc = "Zoom en ambos ejes";
timeOutRef:number;
timer: number = 1000;
public setTimer(t){
if(t>40 && t < 1500){
this.timer = t;
}
}
@ViewChild('canvasElement') canvasRef: ElementRef;
......@@ -279,7 +284,7 @@ export class CanvasComponent {
this.animar();
}
}
}.bind(this),1000);
}.bind(this),this.timer);
}
}
......
<!doctype html><html><head><meta charset="utf-8"><title>Proyecto MateFun</title><base href="/"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" type="image/x-icon" href="favicon.ico"><!-- despues lo saco de aca --><!-- <link rel="stylesheet" type="text/css" href="node_modules/codemirror/addon/hint/show-hint.css"> --><script src="https://code.jquery.com/jquery-3.1.1.slim.min.js" integrity="sha384-A7FZj7v+d/sdmMqp/nOQwliLvUsJfDHW+k9Omg/a/EheAdgtzNs3hpfag6Ed950n" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.4.0/js/tether.min.js" integrity="sha384-DztdAPBWPRXSA/3eYEEUWrWCy7G5KFbe8fFjk5JAIxUYHKkDx6Qin1DkWx51bBrb" crossorigin="anonymous"></script><script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/js/bootstrap.min.js" integrity="sha384-vBWWzlZJ8ea9aCX4pEW3rVHjgjt7zpkNpZk+02D9phzyeVkE+jo0ieGizqPLForn" crossorigin="anonymous"></script><link href="styles.aedd881417e13b7e91de.bundle.css" rel="stylesheet"/></head><body><app-root><div class="loading"><div class="loading-bar"></div><div class="loading-bar"></div><div class="loading-bar"></div><div class="loading-bar"></div><div class="loading-bar"></div></div></app-root><script type="text/javascript" src="inline.02de299abe63337e65f5.bundle.js"></script><script type="text/javascript" src="polyfills.0ae3b4f3e37e6249952f.bundle.js"></script><script type="text/javascript" src="scripts.efaaeb35620859890388.bundle.js"></script><script type="text/javascript" src="vendor.28df4c379f8c8b804b36.bundle.js"></script><script type="text/javascript" src="main.b97df27904c57669405d.bundle.js"></script></body></html>
\ No newline at end of file
<!doctype html><html><head><meta charset="utf-8"><title>Proyecto MateFun</title><base href="/"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" type="image/x-icon" href="favicon.ico"><!-- despues lo saco de aca --><!-- <link rel="stylesheet" type="text/css" href="node_modules/codemirror/addon/hint/show-hint.css"> --><script src="https://code.jquery.com/jquery-3.1.1.slim.min.js" integrity="sha384-A7FZj7v+d/sdmMqp/nOQwliLvUsJfDHW+k9Omg/a/EheAdgtzNs3hpfag6Ed950n" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.4.0/js/tether.min.js" integrity="sha384-DztdAPBWPRXSA/3eYEEUWrWCy7G5KFbe8fFjk5JAIxUYHKkDx6Qin1DkWx51bBrb" crossorigin="anonymous"></script><script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/js/bootstrap.min.js" integrity="sha384-vBWWzlZJ8ea9aCX4pEW3rVHjgjt7zpkNpZk+02D9phzyeVkE+jo0ieGizqPLForn" crossorigin="anonymous"></script><link href="styles.aedd881417e13b7e91de.bundle.css" rel="stylesheet"/></head><body><app-root><div class="loading"><div class="loading-bar"></div><div class="loading-bar"></div><div class="loading-bar"></div><div class="loading-bar"></div><div class="loading-bar"></div></div></app-root><script type="text/javascript" src="inline.0ed6551a1e89b4f266ce.bundle.js"></script><script type="text/javascript" src="polyfills.0ae3b4f3e37e6249952f.bundle.js"></script><script type="text/javascript" src="scripts.efaaeb35620859890388.bundle.js"></script><script type="text/javascript" src="vendor.28df4c379f8c8b804b36.bundle.js"></script><script type="text/javascript" src="main.b97df27904c57669405d.bundle.js"></script></body></html>
\ No newline at end of file
!function(e){function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}var n=window.webpackJsonp;window.webpackJsonp=function(t,a,c){for(var u,f,i,d=0,l=[];d<t.length;d++)f=t[d],o[f]&&l.push(o[f][0]),o[f]=0;for(u in a)Object.prototype.hasOwnProperty.call(a,u)&&(e[u]=a[u]);for(n&&n(t,a,c);l.length;)l.shift()();if(c)for(d=0;d<c.length;d++)i=r(r.s=c[d]);return i};var t={},o={12:0};r.e=function(e){function n(){c.onerror=c.onload=null,clearTimeout(u);var r=o[e];0!==r&&(r&&r[1](new Error("Loading chunk "+e+" failed.")),o[e]=void 0)}if(0===o[e])return Promise.resolve();if(o[e])return o[e][2];var t=new Promise(function(r,n){o[e]=[r,n]});o[e][2]=t;var a=document.getElementsByTagName("head")[0],c=document.createElement("script");c.type="text/javascript",c.charset="utf-8",c.async=!0,c.timeout=12e4,r.nc&&c.setAttribute("nonce",r.nc),c.src=r.p+""+e+"."+{0:"a2834ddcf91edfd3595a",1:"408372ca9caba82cfa85",2:"b856a7489ad17cab0edc",3:"75985c86a9a9f51d170e",4:"944819365f9d2d51724d",5:"59cc434c85d03332d50a",6:"bb496a10043de2a02b50",7:"0ae3b4f3e37e6249952f",8:"b97df27904c57669405d",9:"60839f966270b27d9f76",10:"efaaeb35620859890388"}[e]+".chunk.js";var u=setTimeout(n,12e4);return c.onerror=c.onload=n,a.appendChild(c),t},r.m=e,r.c=t,r.i=function(e){return e},r.d=function(e,n,t){r.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:t})},r.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(n,"a",n),n},r.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},r.p="",r.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file
!function(e){function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}var n=window.webpackJsonp;window.webpackJsonp=function(t,a,c){for(var u,f,i,d=0,l=[];d<t.length;d++)f=t[d],o[f]&&l.push(o[f][0]),o[f]=0;for(u in a)Object.prototype.hasOwnProperty.call(a,u)&&(e[u]=a[u]);for(n&&n(t,a,c);l.length;)l.shift()();if(c)for(d=0;d<c.length;d++)i=r(r.s=c[d]);return i};var t={},o={12:0};r.e=function(e){function n(){c.onerror=c.onload=null,clearTimeout(u);var r=o[e];0!==r&&(r&&r[1](new Error("Loading chunk "+e+" failed.")),o[e]=void 0)}if(0===o[e])return Promise.resolve();if(o[e])return o[e][2];var t=new Promise(function(r,n){o[e]=[r,n]});o[e][2]=t;var a=document.getElementsByTagName("head")[0],c=document.createElement("script");c.type="text/javascript",c.charset="utf-8",c.async=!0,c.timeout=12e4,r.nc&&c.setAttribute("nonce",r.nc),c.src=r.p+""+e+"."+{0:"a2834ddcf91edfd3595a",1:"9e713c866ac2d85446ee",2:"b856a7489ad17cab0edc",3:"75985c86a9a9f51d170e",4:"944819365f9d2d51724d",5:"59cc434c85d03332d50a",6:"bb496a10043de2a02b50",7:"0ae3b4f3e37e6249952f",8:"b97df27904c57669405d",9:"60839f966270b27d9f76",10:"efaaeb35620859890388"}[e]+".chunk.js";var u=setTimeout(n,12e4);return c.onerror=c.onload=n,a.appendChild(c),t},r.m=e,r.c=t,r.i=function(e){return e},r.d=function(e,n,t){r.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:t})},r.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(n,"a",n),n},r.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},r.p="",r.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file
......@@ -4,44 +4,44 @@
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd"
version="2.1">
<persistence-unit name="matefunDS" transaction-type="JTA">
<jta-data-source>java:/matefun</jta-data-source>
<class>edu.proygrado.modelo.Alumno</class>
<class>edu.proygrado.modelo.Archivo</class>
<class>edu.proygrado.modelo.Configuracion</class>
<class>edu.proygrado.modelo.Docente</class>
<class>edu.proygrado.modelo.Evaluacion</class>
<class>edu.proygrado.modelo.Grupo</class>
<class>edu.proygrado.modelo.GrupoPK</class>
<class>edu.proygrado.modelo.Liceo</class>
<class>edu.proygrado.modelo.LiceoPK</class>
<class>edu.proygrado.modelo.Usuario</class>
<class>edu.proygrado.modelo.Sesion</class>
<properties>
<property name="javax.persistence.schema-generation.database.action" value="none" />
<property name="hibernate.hbm2ddl.auto" value="update"/>
</properties>
</persistence-unit>
<!-- <persistence-unit name="matefunDS" transaction-type="JTA"> -->
<!-- <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider> -->
<!-- <jta-data-source>jdbc/azureDSjta</jta-data-source> -->
<!-- <class>edu.proygrado.modelo.Alumno</class> -->
<!-- <class>edu.proygrado.modelo.Archivo</class> -->
<!-- <class>edu.proygrado.modelo.Configuracion</class> -->
<!-- <class>edu.proygrado.modelo.Docente</class> -->
<!-- <class>edu.proygrado.modelo.Evaluacion</class> -->
<!-- <class>edu.proygrado.modelo.Grupo</class> -->
<!-- <class>edu.proygrado.modelo.GrupoPK</class> -->
<!-- <class>edu.proygrado.modelo.Liceo</class> -->
<!-- <class>edu.proygrado.modelo.LiceoPK</class> -->
<!-- <class>edu.proygrado.modelo.Usuario</class> -->
<!-- <class>edu.proygrado.modelo.Sesion</class> -->
<!-- <properties> -->
<!-- <property name="javax.persistence.schema-generation.database.action" value="none" /> -->
<!-- <property name="hibernate.transaction.jta.platform" value="org.hibernate.engine.transaction.jta.platform.internal.WebSphereExtendedJtaPlatform"/> -->
<!-- </properties> -->
<!-- <jta-data-source>java:/matefun</jta-data-source> -->
<!-- <class>edu.proygrado.modelo.Alumno</class> -->
<!-- <class>edu.proygrado.modelo.Archivo</class> -->
<!-- <class>edu.proygrado.modelo.Configuracion</class> -->
<!-- <class>edu.proygrado.modelo.Docente</class> -->
<!-- <class>edu.proygrado.modelo.Evaluacion</class> -->
<!-- <class>edu.proygrado.modelo.Grupo</class> -->
<!-- <class>edu.proygrado.modelo.GrupoPK</class> -->
<!-- <class>edu.proygrado.modelo.Liceo</class> -->
<!-- <class>edu.proygrado.modelo.LiceoPK</class> -->
<!-- <class>edu.proygrado.modelo.Usuario</class> -->
<!-- <class>edu.proygrado.modelo.Sesion</class> -->
<!-- <properties> -->
<!-- <property name="javax.persistence.schema-generation.database.action" value="none" /> -->
<!-- <property name="hibernate.hbm2ddl.auto" value="update"/> -->
<!-- </properties> -->
<!-- </persistence-unit> -->
<persistence-unit name="matefunDS" transaction-type="JTA">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<jta-data-source>jdbc/azureDSjta</jta-data-source>
<class>edu.proygrado.modelo.Alumno</class>
<class>edu.proygrado.modelo.Archivo</class>
<class>edu.proygrado.modelo.Configuracion</class>
<class>edu.proygrado.modelo.Docente</class>
<class>edu.proygrado.modelo.Evaluacion</class>
<class>edu.proygrado.modelo.Grupo</class>
<class>edu.proygrado.modelo.GrupoPK</class>
<class>edu.proygrado.modelo.Liceo</class>
<class>edu.proygrado.modelo.LiceoPK</class>
<class>edu.proygrado.modelo.Usuario</class>
<class>edu.proygrado.modelo.Sesion</class>
<properties>
<property name="javax.persistence.schema-generation.database.action" value="none" />
<property name="hibernate.transaction.jta.platform" value="org.hibernate.engine.transaction.jta.platform.internal.WebSphereExtendedJtaPlatform"/>
</properties>
</persistence-unit>
</persistence>
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