This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private transform(d) { | |
const x = (((d.x0 + d.x1) / 2) * 180) / Math.PI; | |
const y = ((d.y0 + d.y1) / 2) * this.radius; | |
return `rotate(${x - 90}) translate(${y},0) rotate(${x < 180 ? 0 : 180})`; | |
} | |
private position(d) { | |
const x = (((d.x0 + d.x1) / 2) * 180) / Math.PI; | |
const y = ((d.y0 + d.y1) / 2) * this.radius; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, OnInit, ElementRef } from '@angular/core'; | |
import { fromEvent } from 'rxjs'; | |
import { skipUntil, takeUntil } from 'rxjs/operators'; | |
@Component({ | |
selector: 'app-board', | |
templateUrl: './board.component.html', | |
styleUrls: ['./board.component.scss'] | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private getColor(i) { | |
const color0 = '#00ca79'; | |
const color2 = '#7a4da8'; | |
const colorScale = d3 | |
.scaleLinear() | |
.domain([0, categories.length - 1]) | |
.range([color0, color2]) | |
.interpolate(d3.interpolateHcl); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.style('fill',function(d, i){ | |
var c = d3.hsl(d3.rgb(#FF9900)); | |
c.l += ((0.7/2)*i); | |
return c + ""; | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function midpoint(x1, y1, x2, y2, per) { | |
return [x1 + (x2 - x1) * per, y1 + (y2 - y1) * per]; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var isSmall = function() { | |
if (window.matchMedia('(max-width: ' + w_mobile + 'px)').matches) { | |
return true; | |
} else { | |
return false; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function() { | |
$.datepicker._updateDatepicker_original = $.datepicker._updateDatepicker; | |
$.datepicker._updateDatepicker = function(inst) { | |
$.datepicker._updateDatepicker_original(inst); | |
var afterShow = this._get(inst, 'afterShow'); | |
if (afterShow) | |
afterShow.apply((inst.input ? inst.input[0] : null)); // trigger custom callback | |
} | |
$( "#datepicker" ).datepicker({ | |
beforeShow : function(input, inst) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- position fixed top 0 left 0 | |
- flexbox con flexclean si hay flotantes | |
- seudo clases :not se comportan raro tiene mucha especificidad | |
- input type text 0 de ancho no hace trigger focus | |
- box shadow solo se puede poner poco de ancho |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin cleanflex { | |
&::after, | |
&::before { | |
content: ""; | |
display: table; | |
-ms-flex-preferred-size: 0; | |
flex-basis: 0; | |
-webkit-box-ordinal-group: 2; | |
-ms-flex-order: 1; | |
order: 1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function loadSvg(selector, url) { | |
console.log('kshd') | |
var target = document.getElementById(selector); | |
// If SVG is supported | |
if (typeof SVGRect != "undefined") { | |
// Request the SVG file | |
var ajax = new XMLHttpRequest(); | |
ajax.open("GET", url + ".svg", true); | |
ajax.send(); |
NewerOlder