You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
floorplanner edited this page Sep 13, 2010
·
11 revisions
The Floorplanner application has several functions that can be called from Javascript. These functions can modify the current design, show different kind of menu’s or get information about the state of the application.
Calling a function from Javascript
All you need to do to call a function from Javascript is the Floorplanner-object and the name of the function.
var fp = new Floorplanner({ project_id: 123, ... });
fp.embed('div_id');
fp.showForm( "SEND_A_FRIEND" );
Function reference
Function
Description
Parameters
Return
loadFloor(floorId)
Loads the default design of a floor
floorId the id of the floor to load
void
saveDesign(designName)
Saves the current design
designName the name of the design
void
printDesign()
Opens the print dialog to print the current design
none
void
resetDesign()
Clears the current design
none
void
isModified()
Tells if the current design has been modified by the user
none
true or false
showForm(formName, params)
Shows a form (menu) in the appication
formName the name of the form to show: SAVE, SEND_A_FRIEND, CREATE_ACCOUNT, SHARE, SELECT_DESIGN, PROJECT_SETTINGS, EXPORT_IMAGE paramsAdditional parameters in Javascript hash format
void
getProject()
Gets the information about the current project incl. its floors and incl. its designs
none
a Javascript hash with all the information about the project