AnsweredAssumed Answered

how to move the navigation buttons in the AttributeInspector?

Question asked by steinj14 on Mar 11, 2015
Latest reply on Mar 18, 2015 by steinj14

I have added the AttributeInspector to my web app (based on the Basic Viewer template) and it's working fine. 

 

However, the list of attributes is long and when you click on overlapping features you have to scroll to the bottom of the list to view the navigation buttons.

 

Is there a way to add a "duplicate" set up navigation buttons at the top of the attribute list, or at least move them from the bottom to the top?

 

My code is below.

 

Thanks,

Joan

 

 

//JMS MODIFIED FUNCTION TO USE ATTRIBUTE INSPECTOR WIDGET, 4/4/13.
//Functions to create and destroy the editor. We do this each time the edit button is clicked. 
var rezFeatLayer;
var attInspector;
function createEditor() {
    console.log("-->inside createEditor function");
    
    if (attInspector) {
        return;
    }
    
    if (editLayers.length > 0) {
        var templateLayers = dojo.map(editLayers, function (layer) {
            return layer.featureLayer;
        });
        
        rezFeatLayer = templateLayers[0];
        console.log("rezFeatLayer.url: " + rezFeatLayer.url);
        rezFeatLayer.mode = esri.layers.FeatureLayer.MODE_SELECTION;
        rezFeatLayer.outFields = ["*"];

        //Set symbol for highlighting the selected rezoning feature, 6/11/13 jms.
        var symbol = new esri.symbol.SimpleFillSymbol(outlinefillSymbol);
        rezFeatLayer.setSelectionSymbol(symbol);

        var eDiv = dojo.create("div", {
            id: "editDiv"
        });
        
        dojo.byId('editPanel').appendChild(eDiv);
        dojo.byId('editDiv').innerHTML = "<p style='margin-left:5px;'>Select Rezoning Case to Edit</p><div id='attributesDiv'></div>";
        
        var layerInfos = [{
            'featureLayer': rezFeatLayer,
            'showAttachments': false,
            'isEditable': true,
            'showDeleteButton': false,
            'fieldInfos': rezFieldInfos
        }];
            
        attInspector = new esri.dijit.AttributeInspector({
            layerInfos: layerInfos
        }, "div");

        //added to save the edits, 3/14/14 jms
        attInspector.on('attribute-change', function(evt){
            var feature = evt.feature;
            console.log(evt);
            feature.attributes[evt.fieldName] = evt.fieldValue;
            feature.getLayer().applyEdits(null, [feature], null);
        });
        
        disablePopups();
        
        selectRezoning();
    }

}

Outcomes