Skip to content

Instantly share code, notes, and snippets.

View alejandrolechuga's full-sized avatar
🤯
Focusing

neptuno alejandrolechuga

🤯
Focusing
View GitHub Profile
@alejandrolechuga
alejandrolechuga / eje4.js
Last active February 4, 2019 03:43
Prototype
var Mamifero = {
tipo: 'desconocido',
getTipo: function () {
return this.tipo;
}
};
var humano = Object.create(Mamifero);
// Sobre-escribimos el tipo
humano.tipo = 'humano';
@alejandrolechuga
alejandrolechuga / eje3.js
Last active February 4, 2019 01:47
Prototype
function Book(name, year) {
// propiedades
this.name = name;
this.year = year;
}
// metodos
Book.prototype.getName = function () {
return this.name;
};
@alejandrolechuga
alejandrolechuga / eje2.js
Created February 4, 2019 01:29
prototype ejemplo
var libro = new Book('Don quijote', 1612);
var libro2 = new Book('Señor de los anillos', 1930);
// Cuando comparamos
libro.getName === libro2.getName; // false
@alejandrolechuga
alejandrolechuga / eje1.js
Last active February 4, 2019 01:28
prototype explicación
function Book(name, year) {
// propiedades
this.name = name;
this.year = year;
// metodos
this.getName = function () {
return this.name;
};
this.getYear = function () {
return this.year;

SDSAD

id 84334a00-8787-41c2-8be9-e0a3922edd7c:43
VM113508:5 selected true
VM113508:5 active false
VM113508:5 visible true
VM113508:5 position {x: "0px", y: "0px"}
VM113508:5 layoutIndex -1
VM113508:5 screenPosition undefined
VM113508:5 inViewport false
VM113508:5 isEmpty false
VM113508:5 interactable undefined
@alejandrolechuga
alejandrolechuga / printQDModel.js
Created January 29, 2019 18:21
Quickdraw handy
function printModel(element) {
var model =qd.getModel(element);
Object.keys(model).forEach((key) => {
if (typeof model[key] === 'function') {
console.log(key, model[key]());
} else {
console.log(key, model[key]);
}
})
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAz4AAAViCAYAAADDVyluAAAKsGlDQ1BJQ0MgUHJvZmlsZQAASImVlgdUE9kax+/MpBdaQihSQu9IJ4D0GnpvNkJCCSXGQFCxIbK4gmtBRJqygosUBdcCyFoQUWyLogL2BVkU1HWxYENlB3iEt++d9955/znf3N/5cuc/39zce84HAOUuRyhMg2UASBdkikK93ZjRMbFM/BMAARgQgQXAcrgZQtfgYH+Aam78u973o7NR3TaZ9vr33/+rZHkJGVwAoGCU43kZ3HSUT6BxlisUZQKAoAG0VmUKp7kUZboILRDlw9OcNMsd0xw/y3dm5oSHuqM8CgCBwuGIkgAgv0PzzCxuEupDoaNsJuDxBSh7oOzETebwUM5D2Tg9fcU0H0VZP/6ffJL+5hkv8eRwkiQ8+y0zInjwM4RpnDX/53L8b6WniefeoYkGJVnkE4qODHTN6lJX+ElYEB8YNMd83sz8GU4W+0TMMTfDPXaOeRwPvzkWp0a4zjFHNP8sP5MdPseiFaESf0FaoL/EP4Et4YQMz7A5TuR7sec4Ozk8ao6z+JGBc5yRGuY3P8ddkheJQyU1J4q8JN+YnjFfG5cz/67M5HCf+RqiJfXwEjw8JXlBhGS+MNNN4ilMC56vP81bks/ICpM8m4lusDlO4fgGz/sES9YHeABP4I9eTBCMniNbYA6sQQgAmQmrp/c0cF8hXCPiJyVnMl3RU5PAZAu4psZMCzNzFgDTZ3D2L357d+ZsQQzCfE6I+tuh+xapmc/FKwPQiu4LJeJ8TvsQANLRALTkcMWirNkcZvqGBSQgDehACagBLaAPTND6bIADcEEr9gVBIBzEgGWAC5JBOhCBVWAd2ATyQSHYCfaAclAFakAdOAKOgVZwGpwHl8A1cBP0gQdgEIyAF2AcvAeTEAThISpEg5QgdUgHMoIsIBbkBHlC/lAoFAPFQUmQABJD66DNUCFUBJVDB6B66GfoFHQeug
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<link rel="stylesheet" href="http://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css" crossorigin="anonymous">
<title>JS Bin</title>
</head>
<body>