Flash Drawing Control

Add context menu actions to a Flash drawing

Note: With the release of ARCHIBUS V.23.2, all ARCHIBUS views were converted to use the HTML drawing control instead of the Flash drawing control. If you have previously created views that use the Flash drawing control, the view's drawings will still work.

For new views that you create, ARCHIBUS, Inc. recommends using the HTML control, as the Flash control is slated for desupport in future versions of ARCHIBUS. For information on converting existing views with Flash drawings to HTML format, see Convert views with the Flash drawing control to the HTML drawing control.

Technologies / User Interface add-Ins / Flash Drawing Views / Floor Plan with Asset Panel

If there is only one possible action to perform when the user clicks on a room, you should always use the onClick event listener. If there are many possible actions, you can define a context menu that will appear when the user right clicks on a room.

To add a menu item to the drawing control context menu:

afterViewLoad: function() {
this.drawingControl.addContextMenuAction(
'Edit Room', this.editRoom.createDelegate(this));
}

Then define the event listener for the action:

editRoom: function(record)
var restriction = new Ab.view.Restriction();
for (var i=0; i<record.length; i++){
restriction.addClause(record[i]["name"], record[i]["value"], '=');
}
View.openDialog('ab-sp-edit-room.axvw', restriction);
}

Example: http://localhost:8080/archibus/schema/ab-products/solutions/drawing/ab-ex-assetpanel-drawing.axvw

Copyright © 1984-2018, ARCHIBUS, Inc. All rights reserved.