Skip to content

Instantly share code, notes, and snippets.

Avatar
🥬
GROWING

Stephen Zhao stephen-zhao

🥬
GROWING
View GitHub Profile
View Line_7-Times_Square_42nd_Street.txt
This is Times Square - 42nd Street.
Transfer is available to the 1, 2, 3, A, B, C, D, E, F, M, N, Q, R and W trains.
Transfer is available to the shuttle to Grand Central.
Connection is available to the Port Authority Bus Terminal.
This is an accessible station.
The elevator is at the center of the platform.
@stephen-zhao
stephen-zhao / draggamil-docready.js
Last active Dec 24, 2021
Library to Drag Multiple Items Touch-Friendly
View draggamil-docready.js
var draggamil = function() {
var dragItems = document.querySelectorAll('.sticker');
var container = document.querySelector('.is---sticker_container');
var dragStates = {};
var dragMaxZ = 0;
dragItems.forEach(function (dragItem, idx) {
dragItem.setAttribute("drag-id", idx);
var initialTransform = window.getComputedStyle(dragItem).getPropertyValue('transform');
dragStates["" + idx] = {