you can try with this:
http://www.arcgis.com/home/item.html?id=cf41ba2f1798462f9386efdd674f36ba
Always interested to see what people have tried for themselves so far...
..but anyway, if you have a widget that already does most of what you want e.g. display attributes, then have you considered making that widget draggable? (if the widget is suitable, - might not be)
For example, using dojo-dnd-moveable?
Or another approach could be to combine a container widget that does all the dragging stuff with a widget that does the display stuff, i.e. put one inside the other.
Or you could try and write your own either from scratch or start with an existing widget and extend it.
You have to decide, after research, which is the better approach for your requirements/ability etc.
var popup = new esri.dijit.Popup(popupOptions, dojo.create("identifyDiv")); var dnd = new dojo.dnd.Moveable(dojo.byId("identifyDiv"));
popup = new esri.dijit.Popup(popupOptions, "identifyDiv"); var dnd = new dojo.dnd.Moveable(dojo.byId("identifyDiv"));
require([
"esri/arcgis/utils",
"dojo/dnd/Moveable"
], function (arcgisUtils, Movable) {
"use strict";
var mapId = "bc6e18b0c332407e800c234de472939f"; // Replace with your own map ID from ArcGIS.com.
/**
* Makes the popup draggable.
* @returns {dojo/dnd/Movable}
*/
function makePopupDraggable(){
var popupDiv = document.querySelector(".esriPopup");
var dnd;
if (popupDiv) {
dnd = new Movable(popupDiv);
}
// TODO: Figure out how to make the little arrow point the right way after dragging.
return dnd;
}
arcgisUtils.createMap(mapId, "map", {
usePopupManager: true,
mapOptions: {
center: [-120.80566406246835, 47.41322033015946],
zoom: 7,
minZoom: 7
}
}).then(makePopupDraggable);
});
This works, but then you cannot select any text inside the popup. is there a way to work around that?
This works, but then you cannot select any text inside the popup. is there a way to work around that?