moveDim(dimKey: Number, moveTo: PP.Exp.PvtDimPos, indexPosition: Number, fireEvent: Boolean);
dimKey. Key of the dimension to be moved.
moveTo. Position to which the dimension must be moved, it is selected using an element of the PP.Exp.PvtDimPos enumeration.
indexPosition. Index of the new position
fireEvent. Indicates if to fire the position change event to controller.
The moveDim method moves a dimension to a specified position.
The method returns True if the dimension has moved, and False when otherwise.
Executing the example requires that the HTML page contains the ExpressBox component named expressBox (see Example of Creating the ExpressBox Component). Place the dimension by columns in the first position:
var dimBarMaster = expressBox.getPropertyBarView().getDimBarMasterView();
// Handle event of moving the DimensionMoved dimension
dimBarMaster.DimensionMoved.add(function() {
// Refresh all wizard contents
dimBarMaster.refreshAll(True);
});
// Display selection wizard
dimBarMaster.show();
// Get first dimension key
var dimKey = dimBarMaster.getCurrentState().dims.its.it[0].k;
// Change dimensions position
dimBarMaster.moveDim(dimKey, PP.Exp.PvtDimPos.Top, 0, True);
After executing the example the dimension with the index 0 is arranged in columns and is in the first position.
All elements of the selection wizard are refreshed after the dimension is moved, and the browser console displays the result of successful method execution:
true
See also: