Jump to content

UniCanvas ctx issue


andyhill

Recommended Posts

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...