UNPKG

@6thquake/react-material

Version:

React components that implement Google's Material Design.

15 lines (13 loc) 293 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = snapToGrid; /** * @ignore - do not document. */ function snapToGrid(x, y) { var snappedX = Math.round(x / 32) * 32; var snappedY = Math.round(y / 32) * 32; return [snappedX, snappedY]; }