[英]How to remove down arrow icon in dijit.form.dropDownButton?
[英]Positioning the contents of a dojo dijit.form.DropDownButton?
我通過為DropDownButton的onMouseDown
事件添加一個dojo.connect
來解決此問題。 我從DropDownButton的x位置和寬度計算ContentPane的新x位置。 然后,我找到ContentPane的DOM節點的父節點節點,並將其left
樣式參數設置為該新的x位置。
dojo.connect(dijit.byId("mapOverlayDropdown"), 'onMouseDown', function() {
console.log("shown");
var button = dijit.byId("mapOverlayDropdown").domNode;
var gallery = dijit.byId("mapOverlayGallery").domNode.parentNode;
var buttonPos = dojo.position(button, true);
var galleryPos = dojo.position(gallery, true);
var newX = buttonPos.x + buttonPos.w - galleryPos.w;
gallery.style.left = newX.toString() + "px";
});
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.