MCPcopy Create free account
hub / github.com/MankaiHuang/screen-visualization / fillGridAt

Function fillGridAt

public/iframe/lib/js/echarts-wordcloud.js:959–974  ·  view source on GitHub ↗
(x, y, drawMask, dimension, item)

Source from the content-addressed store, hash-verified

957
958 /* Help function to updateGrid */
959 var fillGridAt = function fillGridAt(x, y, drawMask, dimension, item) {
960 if (x >= ngx || y >= ngy || x < 0 || y < 0) {
961 return;
962 }
963
964 grid[x][y] = false;
965
966 if (drawMask) {
967 var ctx = elements[0].getContext('2d');
968 ctx.fillRect(x * g, y * g, maskRectWidth, maskRectWidth);
969 }
970
971 if (interactive) {
972 infoGrid[x][y] = { item: item, dimension: dimension };
973 }
974 };
975
976 /* Update the filling information of the given space with occupied points.
977 Draw the mask on the canvas if necessary. */

Callers 1

updateGridFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected