Skip to content

Instantly share code, notes, and snippets.

@dephora
dephora / PinchZoomPan.js
Created Dec 8, 2018 — forked from iammerrick/PinchZoomPan.js
React Pinch + Zoom + Pan
View PinchZoomPan.js
import React from 'react';
const MIN_SCALE = 1;
const MAX_SCALE = 4;
const SETTLE_RANGE = 0.001;
const ADDITIONAL_LIMIT = 0.2;
const DOUBLE_TAP_THRESHOLD = 300;
const ANIMATION_SPEED = 0.04;
const RESET_ANIMATION_SPEED = 0.08;
const INITIAL_X = 0;
@dephora
dephora / .block
Created Aug 20, 2017
d3 | legend scroll
View .block
license: mit
@dephora
dephora / .block
Created Aug 20, 2017
sparse matrix zoo II
View .block
license: mit
@dephora
dephora / .block
Last active Aug 20, 2017
sparse matrix zoo
View .block
license: mit
View controllers.application.js
import Ember from 'ember';
import { task, timeout } from 'ember-concurrency';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
myTask: task(function * () {
let didConfirm = yield this.get('getConfirmation').perform("Are you sure?");
if (didConfirm) {
alert("woot");
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
@dephora
dephora / index.slim
Created Nov 16, 2016
Shepherd Test Working - Cleanup
View index.slim
.container
.inner-row
.box.one
.box.two
.box.three
.box.four
/ button.btn.btn-reset Reset
.inner-row
button.btn.btn-start Start
@dephora
dephora / index.slim
Created Nov 16, 2016
Shepherd Test - Cleanup Animate
View index.slim
.container
.inner-row
.box.one
.box.two
.box.three
.box.four
/ button.btn.btn-reset Reset
.inner-row
button.btn.btn-animate Animate
.inner-row
@dephora
dephora / index.haml
Last active Nov 14, 2016
Overlay Factory - No Buttons
View index.haml
.box
.box1.shadow
.box2.shadow
.box3.shadow
.box4.shadow
.box5.shadow
%h3
Click an element to create an overlay around it, press any key to clear the overlays.