Search code examples
phpresourcesgridgraphic

editing pictures in a grid


I am working on a cross stitch chart generator, see below for a sample of a chart. I have a lot done but have performance/resource/workflow question.

When the user clicks a box I want to let them change the symbol and bg color. The charts can be large probably an absolute max of like 500x500 cells, but usually probably less than 200x200 cells. Would it be "better" to have a table with cells and when a cell is clicked jquery could do it's thing and change the attributes of the cell? Or have a php script draw a rectangle of desired color and copy a symbol to the correct location and update the chart? I do not know if this will make a difference in the answer, but in the end the user will be able to download a pdf of the chart.

It may also be that neither of my ways is better...

Thank you very much, Todd

enter image description here


Solution

  • The question is, do you need a downloadable chart? If so, use the PHP way. If not, use <table> or CSS to arrange the pictures as a grid.