MCPcopy Create free account
hub / github.com/microsoft/SandDance / buildRowMapping

Function buildRowMapping

docs/app/js/sanddance-app.js:99411–99420  ·  view source on GitHub ↗
(mapping, columns, yOffset)

Source from the content-addressed store, hash-verified

99409 return newTexture;
99410}
99411function buildRowMapping(mapping, columns, yOffset) {
99412 for(var i = 0; i < columns.length; i++){
99413 var _columns$i = columns[i], icon = _columns$i.icon, xOffset = _columns$i.xOffset;
99414 var id = getIconId(icon);
99415 mapping[id] = Object.assign({}, icon, {
99416 x: xOffset,
99417 y: yOffset
99418 });
99419 }
99420}
99421function buildMapping(_ref) {
99422 var icons = _ref.icons, buffer = _ref.buffer, _ref$mapping = _ref.mapping, mapping = _ref$mapping === void 0 ? {} : _ref$mapping, _ref$xOffset = _ref.xOffset, xOffset = _ref$xOffset === void 0 ? 0 : _ref$xOffset, _ref$yOffset = _ref.yOffset, yOffset = _ref$yOffset === void 0 ? 0 : _ref$yOffset, _ref$rowHeight = _ref.rowHeight, rowHeight = _ref$rowHeight === void 0 ? 0 : _ref$rowHeight, canvasWidth = _ref.canvasWidth;
99423 var columns = [];

Callers 1

buildMappingFunction · 0.70

Calls 1

getIconIdFunction · 0.70

Tested by

no test coverage detected