add lines to app.js, just before setting data to api (at the end of function openPopup) if(options.attachTo){
var loc = $(options.attachTo).offset();
$("#" + options.id).css({position:"absolute"}).offset({top:loc.top,left:loc.left});
}
add an attribute to object to call of openPopup Espruino.Core.App.openPopup({
position: "relative",title:.....,attachTo:"#id of object where popup should be on screen"...})
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
During testing I found this option:
if(options.attachTo){
var loc = $(options.attachTo).offset();
$("#" + options.id).css({position:"absolute"}).offset({top:loc.top,left:loc.left});
}
Espruino.Core.App.openPopup({
position: "relative",title:.....,attachTo:"#id of object where popup should be on screen"...})