andyhill Posted January 20, 2022 Share Posted January 20, 2022 Am I having a bad hair day ? (7.4.0, 1.90.1556) What used to work from my memory is now failing me ??? Please advise what I have forgotten - Thanks. Minimum Shell Project attached. Project1.zip Quote Link to comment Share on other sites More sharing options...
andyhill Posted January 20, 2022 Author Share Posted January 20, 2022 My memory came back to me 🤐 I have to wait till Canvas is ready, different updates have different timings so what worked before now takes more time. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 20, 2022 Share Posted January 20, 2022 So, is the issue resolved? Quote Link to comment Share on other sites More sharing options...
andyhill Posted January 20, 2022 Author Share Posted January 20, 2022 Yes, all good Sherzod. I did ask a while ago to please add to the TUniCanvas/TunimCanvas object an "updated" event. We already have a Ready event that fires once only after initialisation. In other words, every time we execute a canvas drawing instruction:- ... UniSession.AddJS('var ctx = fMain.MyCanvas._cc_; '+ '{ '+ stroke/fill etc. '}; ' ); ... procedure TfMain.MyCanvasAjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings); begin if EventName = 'updated' then begin ... end; end; At present we have to allow sufficient time before next action, it would be good to not rely on time but instead an event. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.