Bold and Italic on same cell cause screen to change to white

Posted by: gagandeep.singh on 31 October 2022, 6:13 pm EST

  • Posted 31 October 2022, 6:13 pm EST - Updated 31 October 2022, 6:18 pm EST

    As you can see in the screen shot, it throws me Canvas2D error

    **Canvas2D: Multiple readback operations using getImageData are faster with the willReadFrequently attribute set to true. **

  • Posted 1 November 2022, 12:30 am EST

    Hello Gagandeep,

    The message that was just mentioned is a warning that appears when the getImageData() method is used. When the “font” and “italic” are applied to the same cell, this won’t result in any problems.

    You can look at the following website to learn more about this: https://github.com/fserb/canvas2D/blob/master/spec/will-read-frequently.md

    I tried adding bold and italics to the same cell, but I couldn’t get the problem to happen on my end. On my end, it appears to be operating smoothly. You can use the sample I tested with below as a guide: https://jscodemine.grapecity.com/share/WJcvawW3y0iPJgqrW0MwAQ/

    It appears to be a rendering problem because the entire SpreadJS canvas is blank. There might be a problem with your implementation. To investigate the problem, we would require a sample. Could you kindly provide a simple working sample that reproduces the problem? You could also alter the example provided above and share how you replicated the problem with us.

    Regards,

    Ankit

  • Posted 1 November 2022, 9:41 am EST

    Hi Ankit,

    Here is the link for sample: https://jscodemine.grapecity.com/sample/yy60CcLcLUmEl6XreVLwbg/

    It’s not the whole project sample but it can give you idea what I am trying to do.

  • Posted 2 November 2022, 12:24 am EST

    Hello Gagandeep,

    You are utilising the Cell Changed Event to set the font when the property name is “styleInfo,” as I can see from the sample code snippet you gave.

    However, when I tested utilizing the Cell Changed Event, I saw no problems. On my end, it appears to be operating smoothly.

    Sample: https://jscodemine.grapecity.com/share/HS9lYb60OEiNHLT4Yxge5Q/

    We would require a sample for the investigation. You may provide a sample that replicates the problem with little data. You could also share critical information on our private portal by opening a case at: https://www.grapecity.com/my-account/my-support

    Regards,

    Ankit

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels