cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Pop up open from a collection close up when zoom

lucky2004alex
5-Regular Member

Pop up open from a collection close up when zoom

Hello,

I am facing an error when i try to use pop-up from a collection (mashup inside collection contain a button that open a pop-up). If i try to zoom in or zoom out, the pop-up is closing.

Do you know if collection is refreshing on zoom action or what i can solve this issue?

Thank you in advance, 

Alex

 

 

 

 

 

 

 

 

4 REPLIES 4

Hi @lucky2004alex 

 

Yes, the collection widget refreshes child mashup when we zoom in or zoom out. 

 

Instead of a button in child mashup, you can look into collection events that can satisfy your requirement. Maybe when right clicked / double clicked open popup from main mashup

 

Velkumar_0-1688992093600.png

 

/VR

 

 

 

lucky2004alex
5-Regular Member
(To:Velkumar)

There is a collection mashup that contain more widgets and buttons. I can not use cellClick because i want the mashup /pop up to appear only when button is clicked.

Hello Alex,

 

The trick is to pull the event outside of your collection. You can try it by

  1. (cleaner, but harder to implement, and I'm not sure the collection mashup parameters are updated bi-directionally, so it might not work) Changing a mashup parameter from within your collection widget and "subscribing" to the changes in the outer mashup via an Expression or Validator bound to the collection data source.
  2. (quick, reliable, but a bit dirty) Changing a Session variable from within your collection widget, and "subscribing" to the changes in the outer mashup via an Expression or Validator, bound to that session variable. Session is a good and simple mechanism for propagating events through the mashups hierarchy, for good or for worse.

 

To clarify option (2), the control flow will be the following: [Button click inside collection] --triggers--> [Expression, which generates a random number or the current timestamp in milliseconds] --output--> [Session variable "buttonClicked"] --triggers--> [Expression in the outer mashup, which is configured to fire on data change] --OnChange event triggers--> [Navigation widget in the outer mashup, which displays your popup].

 

/ Constantine

Hi,

 

I agree with @Constantine, the same kind of work around which we implemented in past and worked fine for me. I just back tracked those details and attached for the same scenario in another case. Kindly find the below link to find the references. It may help you.

Link:  https://community.ptc.com/t5/ThingWorx-Developers/Collection-widget-refresh-when-user-zoom-in-zoom-out/m-p/889946#M63243.

 

Thanks & Regards,

Arun C

Top Tags