UNPKG

decentraland-ui

Version:

Decentraland's UI components and styles

12 lines (11 loc) 487 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getEstateCenter = void 0; var getEstateCenter = function (selection) { var xs = Array.from(new Set(selection.map(function (coords) { return coords.x; }).sort())); var ys = Array.from(new Set(selection.map(function (coords) { return coords.y; }).sort())); var x = xs[(xs.length / 2) | 0]; var y = ys[(ys.length / 2) | 0]; return [x, y]; }; exports.getEstateCenter = getEstateCenter;