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);
});