1

I am having a problem with an AttributeInspector that I noticed also exists in an online sample here: http://developers.arcgis.com/javascript/samples/ed_attribute_inspector/

If you click on a polygon to display the AttibuteInspector, you will notice that hovering your mouse over the upper right of the delete button selects the save button. In the Chrome console, I was able to find that there is a rogue tag that might be causing this issue. See attached screenshot.

Imgur

The code that created this is as follows and is seen in the sample code here.

var saveButton = new Button({ label: "Save", "class": "saveButton"});
domConstruct.place(saveButton.domNode, attInspector.deleteBtn.domNode, "after");

How can this issue be avoided so that no parts of the two buttons or their containers overlap?

1

It looks like a possible CSS problem - I'd report it to Esri tech support to see if they can fix it properly in the JS API.

As a workaround you may be able to tweak the CSS yourself to avoid the overlap. Eg try something like this:

.saveButton {
    margin-left: 45px;
}
  • That method doesn't cut it... it messes the layout completely :-( – Mahdi Jul 30 '14 at 18:17
  • @mahdi if not exactly that CSS (it worked for me in my quick test, but I didn't spend hours on it) then try something similar. Until Esri fix the widget I think we're stuck with trying to workaround the problem using hacks like this – Stephen Lead Jul 30 '14 at 23:08
0

Actually, I fixed it later today. It is a CSS bug, and here is how I patched it for now:

attInspector.deleteBtn.domNode.classList.remove("atiButton");

The problem is that in the the CSS class atiButton has a fixed 16px size (geared towards the navigation buttons) and the delete button should not inherit from it, or better yet, the class should change and a new atiNavButton should have the fixed size, etc.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.