Jump to content

unimpanel animate is not working


musti

Recommended Posts

animate unimpanel which works for unipanel doesn't work either.
I want to make a mobile unimpanel that opens from right to left and closes from left to right. I can do this on desktop with a 

Quote

UniSession->AddJS(IUnipanel1->JSName + ".animate({ duration: 1000, to: { x: 50, y:0, opacity: 100}});");
 

in unipanel, but not on mobile.

UnimPanel1->ClientEvents->UniEvents->Values["beforeInit"] = "function (sender, config) {duration: 1000, to: { x: -550, y:0, opacity: 100}; }";

I make animation with it, but I can't do anything to close it, that is, to destroy it from left to right. visible does not happen with false.

what should I do .

Link to comment
Share on other sites

void __fastcall TMainForm::UniDBGrid1CellClick(TUniDBGridColumn *Column)
{
	 
	UniSession->AddJS(UniPanel->JSName + ".animate({ duration: 500, to: { x: 0, y: " +
		IntToStr(UniSession->UniApplication->ScreenHeight - (UniSession->UniApplication->ScreenHeight / 3)) + ", opacity: 100}});");

}
// ---------------------------------------------------------------------------

Hello,

Clicking on a row on the unidbgrid here has a uniPanel that opens from the bottom up.

 

void __fastcall TMainForm::BtnCancelPurpleClick(TObject *Sender)
{
UniSession->AddJS(UniPanel->JSName + ".animate({ duration: 1000, to: { x: 0, y: 2500, opacity: 100}});");
 
}

When I press cancel, this UniPanel disappears from top to bottom.
I want to do the same in mobile form but unimPanel doesn't support it

Link to comment
Share on other sites

×
×
  • Create New...