Members
calibrate_text_offset_flag[undefined]
// 3.3.01g - we are setting these at load time, not here
try{
cvjs_units[cvjs_rPaperIndex(floorplan_div)] = worldUnits.units;
cvjs_svgToWorldUnits[cvjs_rPaperIndex(floorplan_div)] = worldUnits.svgToWorld;
}catch (err){
}
cvjs_displayMagnifyingGlassFlag
REDLINE /STICKYNOTE SAVE LOAD - PRINT
cvjs_iconInterfaceDisabled[undefined]
interfaceCounter++;
var selectedDiv = interfaceCounter;
interfaceCounterDiv[selectedDiv] = floorplan_div+"_svg"; // adding _svg for internal processing
cvjs_stickynote
REDLINE /STICKYNOTE SAVE LOAD - PRINT
defaultColor
default color for standard Space Object selection mode - not selected
defaultColor_Hyperlinks
default color for URL Hyperlinks - not selected
defaultColor_Hyperlinks_blank
default color for URL Hyperlinks - not selected _ blank
defaultColor_linked
default color for Space Object supressPopUpModal mode - linked
defaultColor_unlinked
default color for Space Object supressPopUpModal mode - unlinked
highlight
default color for standard Space Object selection mode - highlighted
highlight_Hyperlinks
default color for URL Hyperlinks selection mode - highlighted
highlight_linked
highlight color for Space Object supressPopUpModal mode - linked
highlight_unlinked
highlight color for Space Object supressPopUpModal mode - unlinked
isSmartPhoneOrTablet
control variable for determinating smartphone or tablet
selectColor
default color for standard Space Object selection mode - selrcted
selectColor_Hyperlinks
default color for URL Hyperlinks selection mode - selected
selectColor_linked
selected color for Space Object supressPopUpModal mode - linked
selectColor_unlinked
selected color for Space Object supressPopUpModal mode - unlinked
text_style_arial_9pt_normal
text style for adding text into Space Objects
text_style_arial_11pt_bold
text style for adding text into Space Objects
text_style_dialog
text style for adding text into Space Objects
vqStickyNotes
StickyNotes and Redlines are independent of nodes files
zindex
Initializes CADViewer JS modals, method to set up modals for print, background change, redline color and thickness change
Methods
cvjs_activateSpaceObjectModal_Id(rmid)
Activate modal on Space Object
Parameters:
Name | Type | Description |
---|---|---|
rmid |
string | Id of space object modal to activate |
cvjs_activateSpaceObjectModal_Node(node)
Activate modal on Space Object
Parameters:
Name | Type | Description |
---|---|---|
node |
string | Node of space object modal to activate |
cvjs_addCircleSpaceObject(floorplan_div)
Add a Space Object Circle
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer JS canvas |
cvjs_addPinMarker(floorplan_div, spaceObjectId, spaceObjectName, spaceObjectType, layer)
Add a Pin Marker Space Object
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer JS canvas |
spaceObjectId |
string | Unique ID of the space object. NOTE! |
spaceObjectName |
string | Name of the space object. |
spaceObjectType |
string | Type of the object |
layer |
string | layer of objects (not yet implemented) |
cvjs_addPolygonSpaceObject(floorplan_div)
Add a Space Object Polygon
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer JS canvas |
cvjs_addRectangleCustomSpaceObject(floorplan_div, svgImagePath, spaceObjectId, spaceObjectName, spaceObjectType, layer)
Add a Space Object Custom Rectangle
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer JS canvas |
svgImagePath |
string | name of path containing wallpaper object |
spaceObjectId |
string | Unique ID of the space object. NOTE! |
spaceObjectName |
string | Name of the space object. |
spaceObjectType |
string | Type of the object |
layer |
string | layer of objects (not yet implemented) |
cvjs_addRectangleSpaceObject(floorplan_div)
Add a Space Object Rectangle
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer JS canvas |
cvjs_addSVGClickHandler_onLoad(mode)
Set the clickhandler mode for SVG on load. The default is false
All SVG objects with an 'id' implemented will be associated with a clickhandler
The method will call a number of user implemented call-back methods:
cvjs_SVGfileObjectClicked(id, x, y) : callback for click on an object, this method is user implemented
cvjs_SVGfileObjectMouseEnter(id, x, y) : callback for mouse entering an object, this method is user implemented
cvjs_SVGfileObjectMouseLeave(id, x, y) : callback for mouse leaving an object, this method is user implemented
cvjs_SVGfileObjectMouseMove(id, x, y) : callback for mouse move on an object, this method is user implemented
Parameters:
Name | Type | Description |
---|---|---|
mode |
boolean | true: click handlers are added to objects on load, false: no handers added on load |
cvjs_AddTextAndTBorderOnSpaceObject3Lines(txtLayer, nodeId, tborderId, leftScale, textId1, textString1, textStyle1, scaleText1, hexColorText1, textId2, textString2, textStyle2, scaleText2, hexColorText2, textId3, textString3, textStyle3, scaleText3, hexColorText3)
Add three lines of text, individually formatted and styled, inside a Space Object
Parameters:
Name | Type | Description |
---|---|---|
txtLayer |
string | layer to apply the text |
nodeId |
string | nodeId of the graphical object in which to place the text |
tborderId |
string | Text Border Id of the new graphical object in which to place the text, of type "TBORDER_xxx" |
leftScale |
float | distance from the left border of Space Object, value between 0 and 1 |
textId1 |
string | Text Id of the first text object, of type "TEXT_xxx" |
textString1 |
string | first line of text |
textStyle1 |
object | textstyle of text line 1, formattet as a java script object with css style elements, predefined is: text_style_arial_11pt_bold , text_style_arial_9pt_normal, text_style_dialog |
scaleText1 |
string | relative scale of text line 1, value between 0 and 1 |
hexColorText1 |
string | color of text line 1 in hex form, for example: #AA00AA |
textId2 |
string | Text Id of the second text object, of type "TEXT_yyy" |
textString2 |
string | second line of text |
textStyle2 |
object | textstyle of text line 2, formattet as a java script object with css style elements |
scaleText2 |
string | relative scale of text line 2, value between 0 and 1 |
hexColorText2 |
string | color of text line 2 in hex form, for example: #AA00AA |
textId3 |
string | Text Id of the third text object, of type "TEXT_zzz" |
textString3 |
string | third line of text |
textStyle3 |
object | textstyle of text line 3, formattet as a java script object with css style elements |
scaleText3 |
string | relative scale of text line 3, value between 0 and 1 |
hexColorText3 |
string | color of text line 3 in hex form, for example: #AA00AA |
cvjs_AddTextAndTBorderOnSpaceObjectId(txtLayer, Id, leftScale, textStringArr, textStyleArr, scaleTextArr, hexColorTextArr, clipping, centering)
Add multiple of text, individually formatted and styled, inside a Space Object
Parameters:
Name | Type | Description |
---|---|---|
txtLayer |
string | layer to apply the text |
Id |
string | Id of the graphical object in which to place the text |
leftScale |
float | distance from the left border of Space Object, value between 0 and 1 |
textStringArr |
array | Array with the lines of text |
textStyleArr |
array | Array with textstyle of text lines, formattet as a java script object with css style elements, predefined is: text_style_arial_11pt_bold , text_style_arial_9pt_normal, text_style_dialog |
scaleTextArr |
array | Array with relative scale of text lines, value between 0 and 1 |
hexColorTextArr |
array | Array of color of text lines in hex form, for example: #AA00AA |
clipping |
boolean | true if clipping of text inside of Space Object, false if text to cross Space Object borders |
centering |
boolean | true if centering of text inside of Space Object, false is default |
cvjs_AddTextAndTBorderOnSpaceObjectId_GlobalHeight(txtLayer, Id, leftScale, textStringArr, textStyleArr, scaleTextArr, hexColorTextArr, clipping)
Add multiple of text, individually formatted and styled, inside a Space Object
Parameters:
Name | Type | Description |
---|---|---|
txtLayer |
string | layer to apply the text |
Id |
string | Id of the graphical object in which to place the text |
leftScale |
float | distance from the left border of Space Object, value between 0 and 1 |
textStringArr |
array | Array with the lines of text |
textStyleArr |
array | Array with textstyle of text lines, formattet as a java script object with css style elements, predefined is: text_style_arial_11pt_bold , text_style_arial_9pt_normal, text_style_dialog |
scaleTextArr |
array | Array with relative scale of text lines, value between 0 and 1, based on global height of drawing |
hexColorTextArr |
array | Array of color of text lines in hex form, for example: #AA00AA |
clipping |
boolean | true if clipping of text inside of Space Object, false if text to cross Space Object borders |
cvjs_AddTextAndTBorderOnSpaceObjectNode(txtLayer, nodeId, leftScale, textStringArr, textStyleArr, scaleTextArr, hexColorTextArr, clipping, centering)
Add multiple of text, individually formatted and styled, inside a Space Object
Parameters:
Name | Type | Description |
---|---|---|
txtLayer |
string | layer to apply the text |
nodeId |
string | nodeId of the graphical object in which to place the text |
leftScale |
float | distance from the left border of Space Object, value between 0 and 1 |
textStringArr |
array | Array with the lines of text |
textStyleArr |
array | Array with textstyle of text lines, formattet as a java script object with css style elements, predefined is: text_style_arial_11pt_bold , text_style_arial_9pt_normal, text_style_dialog |
scaleTextArr |
array | Array with relative scale of text lines, value between 0 and 1 |
hexColorTextArr |
array | Array of color of text lines in hex form, for example: #AA00AA |
clipping |
boolean | true if clipping of text inside of Space Object, false if text to cross Space Object borders |
centering |
boolean | true if centering of text inside of Space Object, false is default |
cvjs_AddTextOnObject(txtLayer, nodeId, leftScale, textString1, textStyle1, scaleText1, hexColorText1, textString2, textStyle2, scaleText2, hexColorText2, textString3, textStyle3, scaleText3, hexColorText3)
Add three layers of text, individually formatted and styled, inside a Space Object
Parameters:
Name | Type | Description |
---|---|---|
txtLayer |
string | layer to apply the text |
nodeId |
string | nodeId of the graphical object in which to place the text |
leftScale |
float | distance from the left border of Space Object, value between 0 and 1 |
textString1 |
string | first line of text |
textStyle1 |
object | textstyle of text line 1, formattet as a java script object with css style elements, predefined is: text_style_arial_11pt_bold , text_style_arial_9pt_normal, text_style_dialog |
scaleText1 |
string | relative scale of text line 1, value between 0 and 1 |
hexColorText1 |
string | color of text line 1 in hex form, for example: #AA00AA |
textString2 |
string | second line of text |
textStyle2 |
object | textstyle of text line 2, formattet as a java script object with css style elements |
scaleText2 |
string | relative scale of text line 2, value between 0 and 1 |
hexColorText2 |
string | color of text line 2 in hex form, for example: #AA00AA |
textString3 |
string | third line of text |
textStyle3 |
object | textstyle of text line 3, formattet as a java script object with css style elements |
scaleText3 |
string | relative scale of text line 3, value between 0 and 1 |
hexColorText3 |
string | color of text line 3 in hex form, for example: #AA00AA |
cvjs_addUserIdToHiddenRedlineUsers(userId)
Add userId to list of redline and stickyNote users to be hidden (on load)
Parameters:
Name | Type | Description |
---|---|---|
userId |
string | the userId to be added to the hidden users list |
cvjs_addUserIdToLockedRedlineUsers(userId)
Add userId to list of redline and stickyNote users to be locked (on load)
Parameters:
Name | Type | Description |
---|---|---|
userId |
string | the userId to be added to the hidden users list |
cvjs_adjustMinimumLineThickness(precentage)
Adjust minimum line thickness
Parameters:
Name | Type | Description |
---|---|---|
precentage |
int | In percentage, set the factor to adjust the minumum line thickness, a value over 100 makes lines thicker, a value below 100 makes lines thinner |
cvjs_ajaxPostCallbackVariable_thumbNails(callbackStatus)
Set the ajax control callback variable
Parameters:
Name | Type | Description |
---|---|---|
callbackStatus |
boolean | set to false then monitor then true |
cvjs_AllGroupsOff()
Turn all Object Space groups off - Object Spaces, Sticky Notes and Redlines are differentiated.
cvjs_AllGroupsOn()
Turn all Object Space groups on - Object Spaces, Sticky Notes and Redlines are differentiated.
cvjs_allLayersInDrawingOn(floorplan_div)
Sets all layers in drawing On
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
String | div of the CADViewerJS canvas |
cvjs_AllLayersOff()
Turn all Object Space layers off - Object Spaces, Sticky Notes and Redlines are differentiated.
cvjs_AllLayersOn()
Turn all Object Space layers on - Object Spaces, Sticky Notes and Redlines are differentiated.
cvjs_allowFileLoadToServer(mode)
Enables file load through the icon interface, or allows it only through the encapsulating application
Parameters:
Name | Type | Description |
---|---|---|
mode |
boolean | true for file load through File Manager, default is false |
cvjs_ApplyPatternOnSpaceObjectId(layer, Id, graphicalPattern, colorHex, fillOpacity)
Apply a predefined pattern on a graphical Space Object
Parameters:
Name | Type | Description |
---|---|---|
layer |
string | layer to apply the pattern |
Id |
string | Id of the graphical object to add hatches |
graphicalPattern |
string | name of the hatch pattern, from a predefined list of patterns: "pattern_45degree_standard" "pattern_45degree_fine" "pattern_45degree_wide" "pattern_90degree_standard" "pattern_90degree_fine" "pattern_90degree_wide" "pattern_135degree_standard" "pattern_135degree_fine" "pattern_135degree_wide" "pattern_0degree_standard" "pattern_0degree_fine" "pattern_0degree_wide" "pattern_45degree_crosshatch_standard" "pattern_45degree_crosshatch_fine" |
colorHex |
string | color of hatch in hex form, for example: #FF0000 |
fillOpacity |
float | fill opacity of pattern, value between 0 and 1 |
cvjs_ApplyPatternOnSpaceObjectNode(layer, nodeId, graphicalPattern, colorHex, fillOpacity)
Apply a predefined pattern on a graphical Space Object
Parameters:
Name | Type | Description |
---|---|---|
layer |
string | layer to apply the pattern |
nodeId |
string | nodeId of the graphical object to add hatches |
graphicalPattern |
string | name of the hatch pattern, from a predefined list of patterns: "pattern_45degree_standard" "pattern_45degree_fine" "pattern_45degree_wide" "pattern_90degree_standard" "pattern_90degree_fine" "pattern_90degree_wide" "pattern_135degree_standard" "pattern_135degree_fine" "pattern_135degree_wide" "pattern_0degree_standard" "pattern_0degree_fine" "pattern_0degree_wide" "pattern_45degree_crosshatch_standard" "pattern_45degree_crosshatch_fine" |
colorHex |
string | color of hatch in hex form, for example: #FF0000 |
fillOpacity |
float | fill opacity of pattern, value between 0 and 1 |
cvjs_ApplyPatternOnUrl(layer, nodeId, graphicalPattern, colorHex, fillOpacity)
Apply a predefined pattern on a URL
Parameters:
Name | Type | Description |
---|---|---|
layer |
string | layer to apply the pattern |
nodeId |
string | nodeId of the graphical object to add hatches |
graphicalPattern |
string | name of the hatch pattern, from a predefined list of patterns: "pattern_45degree_standard" "pattern_45degree_fine" "pattern_45degree_wide" "pattern_90degree_standard" "pattern_90degree_fine" "pattern_90degree_wide" "pattern_135degree_standard" "pattern_135degree_fine" "pattern_135degree_wide" "pattern_0degree_standard" "pattern_0degree_fine" "pattern_0degree_wide" "pattern_45degree_crosshatch_standard" "pattern_45degree_crosshatch_fine" |
colorHex |
string | color of hatch in hex form, for example: #FF0000 |
fillOpacity |
float | fill opacity of pattern, value between 0 and 1 |
cvjs_ApplyRelativeLinearGradientOnObject_layerSort(layer, nodeId, xStart, yStart, xEnd, yEnd, startColor, middleColor, endColor, fillOpacity, layer2)
Apply a linear gradient, with definition of gradient vector, with three colors on a graphical Space Object
Parameters:
Name | Type | Description |
---|---|---|
layer |
string | layer to apply the pattern |
nodeId |
string | nodeId of the graphical object |
xStart |
float | gradient vector x start point, value between 0 and 1 |
yStart |
float | gradient vector y start point, value between 0 and 1 |
xEnd |
float | gradient vector x end point, value between 0 and 1 |
yEnd |
float | gradient vector y end point, value between 0 and 1 |
startColor |
string | start color of gradient in hex form, for example: #FF0000 |
middleColor |
string | middle color of gradient in hex form, for example: #AA00AA |
endColor |
string | end color of gradient in hex form, for example: #00DD00 |
fillOpacity |
float | fill opacity of pattern, value between 0 and 1 |
layer2 |
string | layer which to prepend the gradient layer (typically the main Space Object layer) |
cvjs_ApplyRelativeLinearGradientStandard2ColorsOnSpaceObjectId(layer, Id, startColor, endColor, fillOpacity)
Apply a standard linear gradient with two colors on a graphical Space Object
Parameters:
Name | Type | Description |
---|---|---|
layer |
string | layer to apply the pattern |
Id |
string | Id of the graphical object |
startColor |
string | start color of gradient in hex form, for example: #FF0000 |
endColor |
string | end color of gradient in hex form, for example: #00DD00 |
fillOpacity |
float | fill opacity of pattern, value between 0 and 1 |
cvjs_ApplyRelativeLinearGradientStandard2ColorsOnSpaceObjectNode(layer, nodeId, startColor, endColor, fillOpacity)
Apply a standard linear gradient with two colors on a graphical Space Object
Parameters:
Name | Type | Description |
---|---|---|
layer |
string | layer to apply the pattern |
nodeId |
string | nodeId of the graphical object |
startColor |
string | start color of gradient in hex form, for example: #FF0000 |
endColor |
string | end color of gradient in hex form, for example: #00DD00 |
fillOpacity |
float | fill opacity of pattern, value between 0 and 1 |
cvjs_ApplyRelativeLinearGradientStandard3ColorsOnSpaceObjectId(layer, Id, startColor, middleColor, endColor, fillOpacity)
Apply a standard linear gradient with three colors on a graphical Space Object
Parameters:
Name | Type | Description |
---|---|---|
layer |
string | layer to apply the pattern |
Id |
string | Id of the graphical object |
startColor |
string | start color of gradient in hex form, for example: #FF0000 |
middleColor |
string | middle color of gradient in hex form, for example: #AA00AA |
endColor |
string | end color of gradient in hex form, for example: #00DD00 |
fillOpacity |
float | fill opacity of pattern, value between 0 and 1 |
cvjs_ApplyRelativeLinearGradientStandard3ColorsOnSpaceObjectNode(layer, nodeId, startColor, middleColor, endColor, fillOpacity)
Apply a standard linear gradient with three colors on a graphical Space Object
Parameters:
Name | Type | Description |
---|---|---|
layer |
string | layer to apply the pattern |
nodeId |
string | nodeId of the graphical object |
startColor |
string | start color of gradient in hex form, for example: #FF0000 |
middleColor |
string | middle color of gradient in hex form, for example: #AA00AA |
endColor |
string | end color of gradient in hex form, for example: #00DD00 |
fillOpacity |
float | fill opacity of pattern, value between 0 and 1 |
cvjs_ApplyRelativeRadialGradientOnObject_layerSort(layer, nodeId, xC, yC, radius, startColor, middleColor, endColor, fillOpacity, layer2)
Apply a radial gradient, with definition of gradient vector, with three colors on a graphical Space Object
Parameters:
Name | Type | Description |
---|---|---|
layer |
string | layer to apply the pattern |
nodeId |
string | nodeId of the graphical object |
xC |
float | gradient vector x start point, value between 0 and 1 |
yC |
float | gradient vector y start point, value between 0 and 1 |
radius |
float | gradient vector radius, value between 0 and 1 |
startColor |
string | start color of gradient in hex form, for example: #FF0000 |
middleColor |
string | middle color of gradient in hex form, for example: #AA00AA |
endColor |
string | end color of gradient in hex form, for example: #00DD00 |
fillOpacity |
float | fill opacity of pattern, value between 0 and 1 |
layer2 |
string | layer which to prepend the gradient layer (typically the main Space Object layer) |
cvjs_ApplyRelativeRadialGradientStandard2ColorsOnSpaceObjectId(layer, Id, startColor, endColor, fillOpacity)
Apply a standard radial gradient with two colors on a graphical Space Object
Parameters:
Name | Type | Description |
---|---|---|
layer |
string | layer to apply the pattern |
Id |
string | Id of the graphical object |
startColor |
string | start color of gradient in hex form, for example: #FF0000 |
endColor |
string | end color of gradient in hex form, for example: #00DD00 |
fillOpacity |
float | fill opacity of pattern, value between 0 and 1 |
cvjs_ApplyRelativeRadialGradientStandard2ColorsOnSpaceObjectNode(layer, nodeId, startColor, endColor, fillOpacity)
Apply a standard radial gradient with two colors on a graphical Space Object
Parameters:
Name | Type | Description |
---|---|---|
layer |
string | layer to apply the pattern |
nodeId |
string | nodeId of the graphical object |
startColor |
string | start color of gradient in hex form, for example: #FF0000 |
endColor |
string | end color of gradient in hex form, for example: #00DD00 |
fillOpacity |
float | fill opacity of pattern, value between 0 and 1 |
cvjs_ApplyRelativeRadialGradientStandard3ColorsOnSpaceObjectId(layer, Id, startColor, middleColor, endColor, fillOpacity)
Apply a standard radial gradient with three colors on a graphical Space Object
Parameters:
Name | Type | Description |
---|---|---|
layer |
string | layer to apply the pattern |
Id |
string | Id of the graphical object |
startColor |
string | start color of gradient in hex form, for example: #FF0000 |
middleColor |
string | middle color of gradient in hex form, for example: #AA00AA |
endColor |
string | end color of gradient in hex form, for example: #00DD00 |
fillOpacity |
float | fill opacity of pattern, value between 0 and 1 |
cvjs_ApplyRelativeRadialGradientStandard3ColorsOnSpaceObjectNode(layer, nodeId, startColor, middleColor, endColor, fillOpacity)
Apply a standard radial gradient with three colors on a graphical Space Object
Parameters:
Name | Type | Description |
---|---|---|
layer |
string | layer to apply the pattern |
nodeId |
string | nodeId of the graphical object |
startColor |
string | start color of gradient in hex form, for example: #FF0000 |
middleColor |
string | middle color of gradient in hex form, for example: #AA00AA |
endColor |
string | end color of gradient in hex form, for example: #00DD00 |
fillOpacity |
float | fill opacity of pattern, value between 0 and 1 |
cvjs_batchConvertDrawingsToPDF(drawingFilesArray, pageOrientationArray, pageSizeArray, pageResolutionArray)
Loads a set of drawings, apply page size, page orientation and resolution to each page/drawing.
Produce a multi-page PDF out of the set of drawing.
Parameters:
Name | Type | Description |
---|---|---|
drawingFilesArray |
Array.<string> | String array with name and location of drawings |
pageOrientationArray |
Array.<string> | String array with orientation of drawings: landscape/portrait |
pageSizeArray |
Array.<string> | String array with papersizes of drawings |
pageResolutionArray |
Array.<string> | Array with page resolutions |
cvjs_batchConvertDrawingsToPDF_CustomReport(string, drawingFilesArray, pageOrientationArray, pageSizeArray, pageResolutionArray, string, Object)
Loads a set of drawings, apply page size, page orientation and resolution to each page/drawing.
Produce a multi-page PDF out of the set of drawing.
Parameters:
Name | Type | Description |
---|---|---|
string |
floorPlan - Name of the floorplan div for batch processing | |
drawingFilesArray |
Array.<string> | String array with name and location of drawings |
pageOrientationArray |
Array.<string> | String array with orientation of drawings: landscape/portrait |
pageSizeArray |
Array.<string> | String array with papersizes of drawings |
pageResolutionArray |
Array.<string> | Array with page resolutions |
string |
batchFilesToPDF_Controller - Name of the php document that creates the report when the graphics is created | |
Object |
callbackMethod - callBackMethod to decorate each drawing before publishing |
cvjs_buildFolderTree(FileLocation, DocumentLocation, floorplan_div)
Build a tree structure in which to be able to load CADViewer JS dynamically
Parameters:
Name | Type | Description |
---|---|---|
FileLocation |
string | location of file tree folder |
DocumentLocation |
string | location of current document |
floorplan_div |
string | name of the in which CADViewer JS is running |
cvjs_buildMultiPageSVG(directory, url_directory)
Build an internal navigational structure over a folder with SVG files named sequentially xx_1.svg, xx_2.svg....
Parameters:
Name | Type | Description |
---|---|---|
directory |
string | server side name of the folder in which the svg files are placed. The folder should only contain the svg files to navigate over |
url_directory |
string | url of the folder in which the svg files are placed. |
cvjs_calibrateMeasurement(floorplan_div)
Calibrate measurement
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer JS canvas |
cvjs_changePageByNumber(floorplan_div, newpagenumber) → {boolean}
Change page on the current drawing based on page number
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of on which CADViewer JS is located |
newpagenumber |
int | a number between 1 and the total pages in the drawing |
Returns:
status - false if newpagenumber outside of range, true if page change
- Type
- boolean
cvjs_changeSpaceObjectDisplayMode(floorplan_div)
Sets the mode of Space Object to either display or create
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer JS canvas |
cvjs_changeText_On_BlockHandle(handle, textArr)
Changes visible text attribute objects on a block, referenced through its block handle
Parameters:
Name | Type | Description |
---|---|---|
handle |
string | AutoCAD block handle referecen |
textArr |
Array.<string> | Array with the text objects to be replaced. The lenght of the array determines how many objects are replaced |
cvjs_changeText_On_BlockHandleDiv(handle, textArr, floorplan_div) → {boolean}
Changes visible text attribute objects on a block, referenced through its block handle
Parameters:
Name | Type | Description |
---|---|---|
handle |
string | AutoCAD block handle reference |
textArr |
Array.<string> | Array with the text objects to be replaced. The lenght of the array determines how many objects are replaced |
floorplan_div |
string | name of div containing CADViewer JS canvas |
Returns:
false if handle not found otherwise true
- Type
- boolean
cvjs_checkBlockHandleDiv(handle, floorplan_div) → {boolean}
Checks if a block handle is present on the floorplan
Parameters:
Name | Type | Description |
---|---|---|
handle |
string | AutoCAD block handle reference |
floorplan_div |
string | name of div containing CADViewer JS canvas |
Returns:
false if handle not found otherwise true
- Type
- boolean
cvjs_checkRoomHandleDiv(rmid, floorplan_div) → {boolean}
Checks if a RoomID is present on a given floorplan
Parameters:
Name | Type | Description |
---|---|---|
rmid |
string | Id of the Space Object to highlight |
floorplan_div |
string | name of the div on which the CADViewerJS instance is placed |
Returns:
false if rmid not found otherwise true
- Type
- boolean
cvjs_clear_collab_redline(floorplan_div)
Clear the redlines in collaboration session
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer JS canvas |
cvjs_clearAllImageLinks(floorplan_div)
Clears all image links from the canvas
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer JS canvas |
cvjs_clearAllRedlineHiddenUsers()
Clear all redline and stickyNote userId from hidden users list
cvjs_clearAllRedlineLockedUsers()
Clear all redline and stickyNote userId from locked users list
cvjs_clearCurrentRedline(floorplan_div)
Clear all redlines currently visible
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
String | div of the CADViewerJS canvas |
cvjs_ClearDrawing(floorplan_div)
Clears the drawing space of CADViewer JS
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | the div canvas object to which CADViewer JS is allocated |
cvjs_clearDrawingHyperlinks()
Clears the drawing from any highlight or modals active on Hyperlinks
cvjs_clearDrawingRedlines()
Clears the drawing from any redlines
cvjs_clearDrawingSpaceObjects()
Clears the drawing from any highlight or modals active on Space Objects
cvjs_clearDrawingStickyNotes()
Clears the drawing from any highlight or modals active on StickyNotes
cvjs_clearLayer(layer) → {none}
Clears the current layer
Parameters:
Name | Type | Description |
---|---|---|
layer |
string | name of layer to be cleared |
Returns:
- Type
- none
cvjs_clearLayerDiv(layer, floorplan_div) → {none}
Clears the current layer on a named floorplan div
Parameters:
Name | Type | Description |
---|---|---|
layer |
string | name of layer to be cleared |
floorplan_div |
string | name of floorplan div |
Returns:
- Type
- none
cvjs_clearQuickCounts(floorplan_div)
Clear the quick counts counter
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer JS canvas |
cvjs_clearTextLayer(layer) → {none}
Clears the current layer and resets Text border objects
Parameters:
Name | Type | Description |
---|---|---|
layer |
string | name of layer to be cleared |
Returns:
- Type
- none
cvjs_colorSingleSVGHyperlink(hyperlinkId, hyperFill, hyperOpacity)
Add color to an xlink SVG hyperlinks to have it behave like a dynamic highlight
Parameters:
Name | Type | Description |
---|---|---|
hyperlinkId |
string | the |
hyperFill |
string | the new fill color, of type #00FF00 |
hyperOpacity |
float | the opacity of the fill, a value between 0.0 and 1.0. |
cvjs_compareDrawings_LoadSecondDrawing(floorplan_div)
Loads the second drawing for compare with drawing currently loaded
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer JS canvas |
cvjs_compareDrawings_ToggleDrawingOverlay(floorplan_div)
Toggles the overlaid drawings
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer JS canvas |
cvjs_compareDrawings_ToggleDrawings(floorplan_div)
Toggles the drawings individually
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer JS canvas |
cvjs_CompareFiles_setFileModalContent(custom_modal_dir_listing, floorPlan_div)
Sets the direct content of the file load modal instead of scanning through a designated folder
Parameters:
Name | Type | Description |
---|---|---|
custom_modal_dir_listing |
object | a structure containing filename, url, and path |
floorPlan_div |
String | name of the div that contains the floorplan |
cvjs_connectTextInstances(searchString1, textInstance1, searchString1, textInstance1, lengthfactor1, lengthfactor2)
Connect Text Strings; connects two text strings with a line and arrow
Parameters:
Name | Type | Description |
---|---|---|
searchString1 |
string | the first text string to search after |
textInstance1 |
int | if multiple entries of text object, load instance, the first instance is 1 |
searchString1 |
string | the second text string to search after |
textInstance1 |
int | if multiple entries of text object, load instance, the first instance is 1 |
lengthfactor1 |
int | % value, tells how many percentages line should be shorted at first text |
lengthfactor2 |
int | % value, tells how many percentages line should be shorted at end text |
cvjs_conversion_addAXconversionParameter(name, value-, floorplan_div)
Add an AutoXchange conversion control parameter for server based conversion
Parameters:
Name | Type | Description |
---|---|---|
name |
string | conversion parameter name |
value- |
string | conversion parameter value, if no value set "" |
floorplan_div |
string | name of the div on which the floorplan is places |
cvjs_conversion_cleanFilesDirectory()
Clean the server side temporary folder for files. This command is useful when using cvjs_conversion_setContentResponse("file");
where the server conversion provides a full set of files that is not removed when read by CADViewer JS
cvjs_conversion_clearAXconversionParameters(floorplan_div)
Clears the custom AutoXchange conversion control parameter for server based conversion
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of the div on which the floorplan is places |
cvjs_conversion_getContentResponse()
Get the current type of content response
Returns:
string - Returns type of content response - "file | embedded | stream"
cvjs_conversion_setApplicationServiceParameters(applicationPlatform, applicationPlatformUsername, applicationPlatformUserID, ServiceToken, leaveStreamOnServerOnServer)
Sets control parameter for service conversion
Parameters:
Name | Type | Description |
---|---|---|
applicationPlatform |
string | - |
applicationPlatformUsername |
string | |
applicationPlatformUserID |
string | |
ServiceToken |
string | |
leaveStreamOnServerOnServer |
int |
cvjs_conversion_setContentFormat(contentFormat)
Sets control parameter for conversion
Parameters:
Name | Type | Description |
---|---|---|
contentFormat |
string | "DWG | DXF| DWF | DGN - DGN currently not implemented", |
cvjs_conversion_setContentResponse(userLabel)
Sets control parameter for conversion
Parameters:
Name | Type | Description |
---|---|---|
userLabel |
string | " optional label returned in the response",, |
cvjs_conversion_setContentType(contentType)
Sets control parameter for conversion
Parameters:
Name | Type | Description |
---|---|---|
contentType |
string | "file | embedded | stream" |
cvjs_conversion_setUserLabel(userLabel)
Sets control parameter for conversion
Parameters:
Name | Type | Description |
---|---|---|
userLabel |
string | " optional label returned in the response",, |
cvjs_copyCircleSpaceObject(floorplan_div)
Copy a Space Object Circle
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer JS canvas |
cvjs_currentHost() → {string}
Finds the current host of the library
Returns:
host - current hostlocation
- Type
- string
cvjs_currentMaxNodeId() → {string}
Retrieves the current maximum Node Id for all Space Objects, retrieve and increment when creating new graphical objects
- Deprecated:
- Yes
- Source:
Returns:
maxNode - the current maximum node id
- Type
- string
cvjs_currentMaxSpaceNodeId() → {string}
Retrieves the current maximum Node Id for all Space Objects, retrieve and increment when creating new graphical objects
Returns:
maxNode - the current maximum node id
- Type
- string
cvjs_currentURL() → {string}
Finds the current url of the library
Returns:
url - current location
- Type
- string
cvjs_debugMode(debug)
Sets debug mode
Parameters:
Name | Type | Description |
---|---|---|
debug |
boolean | true for debug traces, false otherwise |
cvjs_deleteLastRedline(floorplan_div)
Deletes the last drawn Redline
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
String | div of the CADViewerJS canvas |
cvjs_deleteSingleRedline(floorplan_div)
Deletes a single redline
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
String | div of the CADViewerJS canvas |
cvjs_deleteSpaceObject(floorplan_div)
Delete a Space Object
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer JS canvas |
cvjs_DisablePrintIcon(floorplan_div)
Disables print Icon
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
String | name of in which CADViewer is running |
cvjs_displayAllInterfaceControls(floorplan_div)
Show the page change modal
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
String | the div running CADViewer JS |
cvjs_displayAllInterfaceControls(mode, floorplan_div)
Removes all icon interface components for viewing, redlining, etc. so that developers can control their own interface
Parameters:
Name | Type | Description |
---|---|---|
mode |
boolean | Set the modal interface, default is true |
floorplan_div |
String | the div running CADViewer JS |
cvjs_displayCustomToolTip(id)
Set a custom tooltip overwriting the standard tooltip displaying either Name or Id
Parameters:
Name | Type | Description |
---|---|---|
id |
string | id of the custom tooltip object to be displayed |
cvjs_displayInformationModal(floorplan_div, text, modalHeight, modal_left,, modal_top,)
Activates and displays the information modal with text
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer JS canvas |
text |
String | string to display |
modalHeight |
int | of modal, omit if using standard values |
modal_left, |
int | position of modal |
modal_top, |
int | position of modal |
cvjs_displaySpaceObjectsStructure(floorplan_div)
Display of Space Object structure in User Mode, with enabled seach panel
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer JS canvas |
cvjs_displayTopMenuIconBar(display_status, floorplan_div)
Controls top menu icon bar visibility
Parameters:
Name | Type | Description |
---|---|---|
display_status |
boolean | default is true, use false to hide menu bar |
floorplan_div |
String | div in which CADViewer JS is implemented |
cvjs_displayTopNavigationBar(display_status, floorplan_div)
Controls top menu navigation bar visibility
Parameters:
Name | Type | Description |
---|---|---|
display_status |
boolean | default is true, use false to hide menu bar |
floorplan_div |
String | div in which CADViewer JS is implemented |
cvjs_dragBackgroundToBack_SVG(floorplan_div)
Sends the dragging background to back - default
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of on which CADViewer JS is located |
cvjs_dragBackgroundToFront_SVG(floorplan_div)
Brings the dragging background to front - used for drawings with static filled polygons
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of on which CADViewer JS is located |
cvjs_drawRedline__Freehand()
Draws interactively a freehand redline. The data object of the redline is defined as a Redline. Prior to calling this method, cvjs_setCurrentRedlineValues() should be called.
cvjs_drawRedline_Freehand(floorplan_div)
Draws a freehand redline - uses global settings of color and width
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer JS canvas |
cvjs_drawRedline_Freehand_globalColorWidth()
Draws a freehand redline - uses global values of color and width
cvjs_drawRedlineArrow(floorplan_div)
Draws a redline polyline with arrow - uses global settings of color and width
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer JS canvas |
cvjs_drawRedlineCloud(floorplan_div)
Draws a redline cloud - uses global settings of color and width
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer JS canvas |
cvjs_drawRedlineFilledPolygon(floorplan_div)
Draws a redline filled polygon - uses global settings of color and width
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer JS canvas |
cvjs_drawRedlineFilledRectangle(floorplan_div)
Draws a redline filled rectangle - uses global settings of color and width
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer JS canvas |
cvjs_drawRedlinePolyline(floorplan_div)
Draws a redline polyline - uses global settings of color and width
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer JS canvas |
cvjs_drawRedlineRectangle(floorplan_div)
Draws a redline rectangle - uses global settings of color and width
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer JS canvas |
cvjs_drawRedlineText(floorplan_div)
Draws a redline text - uses global settings of color
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer JS canvas |
cvjs_drawSpaceObject_Circle()
Draws interactively a circle. The data object of the circle is defined as a Space Object. Prior to calling this method, cvjs_setCurrentSpaceObjectNodeValues() should be called.
cvjs_drawSpaceObject_CopyCircle()
Draws interactively a copy of a previously defined cicle object. The data object of the circle is defined as a SpaceObject. Prior to calling this method, cvjs_setCurrentSpaceObjectNodeValues() should be called.
cvjs_drawSpaceObject_CustomRectangle()
Draws interactively a rectangle and add a custom wallpaper. The data object of the rectangle is defined as a Space Object. Prior to calling this method, cvjs_setCurrentSpaceObjectNodeValues() should be called.
cvjs_drawSpaceObject_FilledRedlineRectangle()
Draws interactively a filled redline rectangle. Prior to calling this method, cvjs_setCurrentRedlineValues() should be called.
cvjs_drawSpaceObject_PinMarker()
Interactively draws a custom wallpaper. The data object of the rectangle is defined as a Space Object. Prior to calling this method, cvjs_setCurrentSpaceObjectNodeValues() should be called.
cvjs_drawSpaceObject_Polygon()
Draws interactively a polygon. The data object of the polygon is defined as a Space Object. Prior to calling this method, cvjs_setCurrentSpaceObjectNodeValues() should be called.
cvjs_drawSpaceObject_Rectangle()
Draws interactively a rectangle. The data object of the rectangle is defined as a Space Object. Prior to calling this method, cvjs_setCurrentSpaceObjectNodeValues() should be called.
cvjs_drawSpaceObject_RedlineArrowPolyline()
Draws interactively a redline polyline with arrow. Prior to calling this method, cvjs_setCurrentRedlineValues() should be called.
cvjs_drawSpaceObject_RedlineCloud()
Draws interactively a cloud. Prior to calling this method, cvjs_setCurrentRedlineValues() should be called.
cvjs_drawSpaceObject_RedlineEllipse()
Draws interactively a Redline Ellipse . Prior to calling this method, cvjs_setCurrentRedlineValues() should be called.
cvjs_drawSpaceObject_RedlineEllipseCloud()
Draws interactively a Redline Ellipse Cloud . Prior to calling this method, cvjs_setCurrentRedlineValues() should be called.
cvjs_drawSpaceObject_RedlineFilledPolygon()
Draws interactively a redline polygon. Prior to calling this method, cvjs_setCurrentRedlineValues() should be called.
cvjs_drawSpaceObject_RedlinePolyline()
Draws interactively a redline polyline. Prior to calling this method, cvjs_setCurrentRedlineValues() should be called.
cvjs_drawSpaceObject_RedlineRectangle()
Draws interactively a redline rectangle. Prior to calling this method, cvjs_setCurrentRedlineValues() should be called.
cvjs_drawStickyNote(floorplan_div)
Draws a freehand stickynote - uses global settings of user and user id
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer JS canvas |
cvjs_drawStickyNoteDirect()
Draws interactively a stickynote. The data object of the sticky note is defined as a StickyNote. Prior to calling this method, cvjs_setCurrentStickyNoteValues() should be called.
cvjs_dynamicResizeTextOnSpaceObject(nodeUnderbar)
Dynamic resize and change location of text objects drawn on Space Object
Parameters:
Name | Type | Description |
---|---|---|
nodeUnderbar |
string | the data node containing the Space Object to which the text is associated |
cvjs_dynamicResizeTextOnSpaceObject_Id(id)
Dynamic resize and change location of text objects drawn on Space Object
Parameters:
Name | Type | Description |
---|---|---|
id |
string | the id of the data node containing the Space Object to which the text is associated |
cvjs_dynamicResizeTextOnSpaceObject_Name(name)
Dynamic resize and change location of text objects drawn on Space Object
Parameters:
Name | Type | Description |
---|---|---|
name |
string | the name of the data node containing the Space Object to which the text is associated |
cvjs_emailScreenAsPDFwithRedlines(floorplan_div)
Saves a floorplan with overlays as SVG file, then embed it into a pdf and send it as email
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of on which CADViewer JS is located |
cvjs_emailSettings_PDF_publish(from_name, from_mail, cc_mail, replyto)
Settings for email sender in the PDF publish method. When calling this method, email will be activated
Parameters:
Name | Type | Description |
---|---|---|
from_name |
string | name of the from sender in redline PDF email |
from_mail |
string | email address of the from sender in redline PDF email |
cc_mail |
string | email of the cc address when sending redline PDF email |
replyto |
string | mail of the reply to sender in redline PDF email |
cvjs_EnablePrintIcon(floorplan_div)
Enables print Icon
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
String | name of in which CADViewer is running |
cvjs_encapsulateUrl_callback(true:)
Encapsulate Url in JavaScript callback method cvjs_Url_callback(). Developer gets control over all hyperlinks in drawing
Parameters:
Name | Type | Description |
---|---|---|
true: |
boolean | enable callback method false: disable callback method (link directly from drawing) |
cvjs_encodeURIcallToserver(flag)
Sets flag to control if call to server php for conversion shall be URI encoded or not. Default is true.
Parameters:
Name | Type | Description |
---|---|---|
flag |
boolean | default is true. Set to true to custom implement this feature |
cvjs_exitCompareDrawings(floorplan_div)
Exit compare drawing and returns to base drawing
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer JS canvas |
cvjs_exitQuickCount(floorplan_div)
Exit quick count, alternative method to double click or Esc
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer JS canvas |
cvjs_fileLoad_setContentFormat(fileFormat)
Sets fileformat for file-load
Parameters:
Name | Type | Description |
---|---|---|
fileFormat |
string | "PNG, JPG, GIF", to set bitmap, "JS" for standard load |
cvjs_fileLoadFromSharePointServer(mode)
Sets file loading so that it done from a SharePoint Server
Parameters:
Name | Type | Description |
---|---|---|
mode |
boolean | true to load files from sharepoint server, file names are then loaded through internal sharepoint REST calls, false is default standard server load of draiwngs |
cvjs_generateShareFileDrawingList()
Calls server side PHP controller to fetch file list from Sharepoint server. A CAD server tree is built for jstree file selector.
cvjs_getAllRedlines_TextList() → {String}
Generate list with all redline text and their corresponding userId
Returns:
value - Returns Id, redline text list; (userid,redlinetext);(userid,redlinetext)
- Type
- String
cvjs_getAllRedlines_UserIdList() → {String}
Generate list with all redlines users
Returns:
value - Returns Id list, separated by ;
- Type
- String
cvjs_getAttributeFromSpaceObjectNode(NodeId, name) → {object}
Retrieves an attribute value from a Space Object
Parameters:
Name | Type | Description |
---|---|---|
NodeId |
string | Node id of the Space Object in which to retrive an attribute |
name |
string | name of attribute (name, value) pair |
Returns:
value - Returns the value pair corresponding to the given name
- Type
- object
cvjs_getAttributeStatus(NodeId) → {object}
Retrieves the attribute status from a Space Object
Parameters:
Name | Type | Description |
---|---|---|
NodeId |
string | Node id of the Space Object in which to retrive the status |
Returns:
value - Returns the attributeStatus
- Type
- object
cvjs_getCurrentMeasurementUnit() → {string}
Returns the setting of Measurement Units on the current drawing/page from the active floorplan_div
Returns:
units - Measurement Unit (mmn, cm, m, feet, inch)
- Type
- string
cvjs_getCurrentMultiPage_FileName() → {string}
Returns the current fileName from the MultiPages list
Returns:
url - current location
- Type
- string
cvjs_getCurrentPage() → {int}
Returns the current page number in the document loaded
Returns:
pageNumber
- Type
- int
cvjs_getRedlineHiddenUsersList() → {String}
Lists all redline and stickyNote userId from hidden users list
Returns:
value - Returns Id list
- Type
- String
cvjs_getRedlineLockedUsersList() → {String}
Lists all redline and stickyNote userId from locked users list
Returns:
value - Returns Id list
- Type
- String
cvjs_getSpaceObjectIdfromNode(Id) → {object}
Returns the first Id in the Space Object structure based on a nodeId
Parameters:
Name | Type | Description |
---|---|---|
Id |
string | Node id of the Space Object in which to retrive the id data filed |
Returns:
value - Returns the id corresponding to the given nodeId, -1 if not found
- Type
- object
cvjs_getSpaceObjectIdList() → {array}
Returns a list with all Ids in the Space Object structure
Returns:
value - Returns Id list
- Type
- array
cvjs_getSpaceObjectNamefromId(Id) → {object}
Returns the first Name in the Space Object structure based on an Id
Parameters:
Name | Type | Description |
---|---|---|
Id |
string | Id of the Space Object in which to retrive the name |
Returns:
value - Returns the Name corresponding to the given Id, -1 if not found
- Type
- object
cvjs_getSpaceObjectNamefromNode(NodeId) → {object}
Returns the first Name in the Space Object structure based on a nodeId
Parameters:
Name | Type | Description |
---|---|---|
NodeId |
string | Node id of the Space Object in which to retrive the Name data filed |
Returns:
value - Returns the Name corresponding to the given nodeId, -1 if not found
- Type
- object
cvjs_getSpaceObjectNamesList() → {array}
Returns a list with all Names in the Space Object structure
Returns:
value - Returns Names list
- Type
- array
cvjs_getSpaceObjectNodefromId(Id) → {object}
Returns the first NodeId in the Space Object structure based on an Id
Parameters:
Name | Type | Description |
---|---|---|
Id |
string | Id of the Space Object in which to retrive the Node id |
Returns:
value - Returns the NodeId corresponding to the given Id, -1 if not found
- Type
- object
cvjs_getStickyNoteInfo() → {string}
Get the content of all StickyNotes
Returns:
stickyNoteContent - xml wrapped content: userid, id, name, date, text, page
- Type
- string
cvjs_getSvgToWorldUnits() → {float}
Returns the setting of SVG to World Units on the current drawing/page from the active floorplan_div
Returns:
svgToWorldUnits - conversion factor for measurements
- Type
- float
cvjs_GroupOff(layer)
Turn single Object Space group off - Object Spaces, Sticky Notes and Redlines are differentiated.
Parameters:
Name | Type | Description |
---|---|---|
layer |
string | name of group to turn off |
cvjs_GroupOn(layer)
Turn single Object Space group on - Object Spaces, Sticky Notes and Redlines are differentiated.
Parameters:
Name | Type | Description |
---|---|---|
layer |
string | name of group to turn on |
cvjs_GroupOn_AllOff(layer)
Turn single Object Space group on, all other groups are turned off - Object Spaces, Sticky Notes and Redlines are differentiated.
Parameters:
Name | Type | Description |
---|---|---|
layer |
string | name of group to turn on |
cvjs_GroupOn_OthersOff(layer)
Turn single Object Space group on, all other groups are turned off - Object Spaces, Sticky Notes and Redlines are differentiated.
Parameters:
Name | Type | Description |
---|---|---|
layer |
string | name of group to turn on |
cvjs_hideAllInterfaceControls(floorplan_div)
Hide the page change modal
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
String | the div running CADViewer JS |
cvjs_hideAllRedlines_ExceptCurrentUser()
Hide all redlines except current userId
cvjs_hideAllRedlines_ExceptUser(userId)
Hide all redlines except named userId
Parameters:
Name | Type | Description |
---|---|---|
userId |
string | the userId to be displayed, all other hidden |
cvjs_hideAllRedlines_HiddenUsersList()
Hide all redlines with userId on the Hidden Users List
cvjs_hideInformationModal(floorplan_div)
Hides the information modal with text
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer JS canvas |
cvjs_hideToolTip()
Hides the standard tooltip previously shown with cvjs_showToolTipLocation(tiptext, x, y)
cvjs_highlightAllSpaceObjects(roomstyle, layer)
Highlights all Space Objects with a given style on a given layer
Parameters:
Name | Type | Description |
---|---|---|
roomstyle |
object | JSON formattet object containg the styling of the Space Objects |
layer |
string | layer on which to draw the highlights |
cvjs_highlightRoomCSS_layer(Id, roomstyle, layer)
Highlights a Space Object with a given style on a given layer
Parameters:
Name | Type | Description |
---|---|---|
Id |
string | Id of the Space Object to highlight |
roomstyle |
object | JSON formattet object containg the styling of the SpaceObject |
layer |
string | layer on which to draw the highlight |
cvjs_highlightRoomCSS_layersort(Id, roomstyle, layer, layer2)
Highlights a Space Object with a given style on a given layer
Parameters:
Name | Type | Description |
---|---|---|
Id |
string | Id of the Space Object to highlight |
roomstyle |
object | JSON formattet object containg the styling of the SpaceObject |
layer |
string | layer on which to draw the highlight |
layer2 |
string | layer is put on top of layer2 |
cvjs_highlightRoomCSS_layersortDiv(rmid, roomstyle, layer, floorplan_div) → {boolean}
Highlights a Space Object with a given style on a given layer
Parameters:
Name | Type | Description |
---|---|---|
rmid |
string | Id of the Space Object to highlight |
roomstyle |
object | JSON formattet object containg the styling of the SpaceObject |
layer |
string | layer on which to draw the highlight |
floorplan_div |
string | name of the div on which the CADViewerJS instance is placed |
Returns:
false if rmid not found otherwise true
- Type
- boolean
cvjs_highlightSpaceBorderCSS_layersort(Id, roomstyle, layer, layer2, lineWeightFactor)
Highlights a Space Object bordr with a given style on a given layer
Parameters:
Name | Type | Description |
---|---|---|
Id |
string | Id of the Space Object to highlight |
roomstyle |
object | JSON formattet object containg the styling of the SpaceObject |
layer |
string | layer on which to draw the highlight |
layer2 |
string | layer is put on top of layer2 |
lineWeightFactor |
floar | scale factor on border line weight |
cvjs_highlightSpaceBorderCSS_layersortDiv(rmid, roomstyle, layer, floorplan_div, lineWeightFactor) → {boolean}
Highlights a Space Object bordr with a given style on a given layer
Parameters:
Name | Type | Description |
---|---|---|
rmid |
string | Id of the Space Object to highlight |
roomstyle |
object | JSON formattet object containg the styling of the SpaceObject |
layer |
string | layer on which to draw the highlight |
floorplan_div |
string | name of the div on which the CADViewerJS instance is placed |
lineWeightFactor |
floar | scale factor on border line weight |
Returns:
false if rmid not found otherwise true
- Type
- boolean
cvjs_highlightSpaceObjectId(Id, roomstyle, layer)
Highlights a Space Object with a given style on a given layer
Parameters:
Name | Type | Description |
---|---|---|
Id |
string | Id of the Space Object to highlight |
roomstyle |
object | JSON formattet object containg the styling of the SpaceObject |
layer |
string | layer on which to draw the highlight |
cvjs_highlightSpaceObjectIdDiv(Id, roomstyle, layer, floorplan_div)
Highlights a Space Object with a given style on a given layer
Parameters:
Name | Type | Description |
---|---|---|
Id |
string | Id of the Space Object to highlight |
roomstyle |
object | JSON formattet object containg the styling of the SpaceObject |
layer |
string | layer on which to draw the highlight |
floorplan_div |
string | floorplan div with CADViewer JS instance |
cvjs_highlightURL(Id, roomstyle, layer)
Highlights a URL with a given style on a given layer
Parameters:
Name | Type | Description |
---|---|---|
Id |
string | Id of the URL to highlight |
roomstyle |
object | JSON formattet object containg the styling of the URL |
layer |
string | layer on which to draw the highlight |
cvjs_idObjectClicked() → {string}
Identify the id of the last Object Space selected - Object Spaces, Sticky Notes and Redlines are differentiated.
Returns:
objectId - The objectId is (-1) in case of no current object selected
- Type
- string
cvjs_IdObjectClicked() → {string}
Identify the id of the last Object Space selected - Object Spaces, Sticky Notes and Redlines are differentiated.
Returns:
objectId - The objectId is (-1) in case of no current object selected
- Type
- string
cvjs_Init_ConversionServer(rest_api_url, rest_api_php, username, password)
Set up CADViewer JS for the call to the server side custom implementation of the API controlling conversions of DWG,DXF, and DWF files through AutoXchange
Parameters:
Name | Type | Description |
---|---|---|
rest_api_url |
string | url of conversion rest api on server |
rest_api_php |
string | url of the PHP rest controller on server |
username |
string | the username of the server, "" if no username |
password |
string | the password of the server, "" if no username |
cvjs_InitCADViewerJS(floorplan_div, image, javascripts_folder)
Initializes CADViewer JS, any of the methods cvjs_InitCADViewerJS_ must always be called setting up CADViewer JS
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | the SVG canvas object to which CADViewer JS is allocated |
image |
string | folder - the path to the image location folder with icon settings, default is "+cvjs_imagesLocation+" |
javascripts_folder |
string | the path to javascripts folder with icon settings, default is ../javscripts/ |
cvjs_InitCADViewerJS_app(floorplan_div, app)
Initializes CADViewer JS, any of the methods cvjs_InitCADViewerJS_ must always be called setting up CADViewer JS
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | the SVG canvas object to which CADViewer JS is allocated |
app |
string | folder - the path (relative or absolute) to the main application folder "app" , the default is the relative path "../app/" |
cvjs_InitCADViewerJS_app_highLight(floorplan_div, app, cvjsRoomPolygonBaseAttributes, cvjsRoomPolygonHighlightAttributes, cvjsRoomPolygonSelectAttributes)
Initializes CADViewer JS, any of the methods cvjs_InitCADViewerJS_ must always be called setting up CADViewer JS
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | the SVG canvas object to which CADViewer JS is allocated |
app |
string | folder - the path (relative or absolute) to the main application folder "app" , the default is the relative path "../app/" |
cvjsRoomPolygonBaseAttributes |
object | javascript object containing fill, color and stroke properties for display of Space Object roompolygons |
cvjsRoomPolygonHighlightAttributes |
object | javascript object containing fill, color and stroke properties for mouseover highlight of Space Object roompolygons |
cvjsRoomPolygonSelectAttributes |
object | javascript object containing fill, color and stroke properties for select highlight of Space Object roompolygons |
cvjs_InitCADViewerJS_app_highLight_popUp(floorplan_div, app, cvjsRoomPolygonBaseAttributes, cvjsRoomPolygonHighlightAttributes, cvjsRoomPolygonSelectAttributes, cvjsPopUpBody)
Initializes CADViewer JS, any of the methods cvjs_InitCADViewerJS_ must always be called setting up CADViewer JS
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | the SVG canvas object to which CADViewer JS is allocated |
app |
string | folder - the path (relative or absolute) to the main application folder "app" , the default is the relative path "../app/" |
cvjsRoomPolygonBaseAttributes |
object | javascript object containing fill, color and stroke properties for display of Space Object roompolygons |
cvjsRoomPolygonHighlightAttributes |
object | javascript object containing fill, color and stroke properties for mouseover highlight of Space Object roompolygons |
cvjsRoomPolygonSelectAttributes |
object | javascript object containing fill, color and stroke properties for select highlight of Space Object roompolygons |
cvjsPopUpBody |
object | html/css styled object containing the content of the modal when selecting Space Objects |
cvjs_InitCADViewerJS_highLight(floorplan_div, cvjsRoomPolygonBaseAttributes, cvjsRoomPolygonHighlightAttributes, cvjsRoomPolygonSelectAttributes)
Initializes CADViewer JS, any of the methods cvjs_InitCADViewerJS_ must always be called setting up CADViewer JS
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | the SVG canvas object to which CADViewer JS is allocated |
cvjsRoomPolygonBaseAttributes |
object | javascript object containing fill, color and stroke properties for display of Space Object roompolygons |
cvjsRoomPolygonHighlightAttributes |
object | javascript object containing fill, color and stroke properties for mouseover highlight of Space Object roompolygons |
cvjsRoomPolygonSelectAttributes |
object | javascript object containing fill, color and stroke properties for select highlight of Space Object roompolygons |
cvjs_InitCADViewerJS_highLight_popUp(floorplan_div, cvjsRoomPolygonBaseAttributes, cvjsRoomPolygonHighlightAttributes, cvjsRoomPolygonSelectAttributes, cvjsPopUpBody)
Initializes CADViewer JS, any of the methods cvjs_InitCADViewerJS_ must always be called setting up CADViewer JS
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | the SVG canvas object to which CADViewer JS is allocated |
cvjsRoomPolygonBaseAttributes |
object | javascript object containing fill, color and stroke properties for display of Space Object roompolygons |
cvjsRoomPolygonHighlightAttributes |
object | javascript object containing fill, color and stroke properties for mouseover highlight of Space Object roompolygons |
cvjsRoomPolygonSelectAttributes |
object | javascript object containing fill, color and stroke properties for select highlight of Space Object roompolygons |
cvjsPopUpBody |
object | html/css styled object containing the content of the modal when selecting Space Objects |
cvjs_InitCADViewerJS_highLight_popUp_app(floorplan_div, app, cvjsRoomPolygonBaseAttributes, cvjsRoomPolygonHighlightAttributes, cvjsRoomPolygonSelectAttributes, cvjsPopUpBody)
Initializes CADViewer JS, any of the methods cvjs_InitCADViewerJS_ must always be called setting up CADViewer JS
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | the SVG canvas object to which CADViewer JS is allocated |
app |
string | folder - the path (relative or absolute) to the main application folder "app" , the default is the relative path "../app/" |
cvjsRoomPolygonBaseAttributes |
object | javascript object containing fill, color and stroke properties for display of Space Object roompolygons |
cvjsRoomPolygonHighlightAttributes |
object | javascript object containing fill, color and stroke properties for mouseover highlight of Space Object roompolygons |
cvjsRoomPolygonSelectAttributes |
object | javascript object containing fill, color and stroke properties for select highlight of Space Object roompolygons |
cvjsPopUpBody |
object | html/css styled object containing the content of the modal when selecting Space Objects |
cvjs_InitCADViewerJS_highLight_popUp_dual_Id(floorplan_div, cvjsRoomPolygonBaseAttributes, cvjsRoomPolygonHighlightAttributes, cvjsRoomPolygonSelectAttributes, cvjsPopUpBody, cvjsPopUpBody2)
Initializes CADViewer JS, any of the methods cvjs_InitCADViewerJS_ must always be called setting up CADViewer JS
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | the SVG canvas object to which CADViewer JS is allocated |
cvjsRoomPolygonBaseAttributes |
object | javascript object containing fill, color and stroke properties for display of Space Object roompolygons |
cvjsRoomPolygonHighlightAttributes |
object | javascript object containing fill, color and stroke properties for mouseover highlight of Space Object roompolygons |
cvjsRoomPolygonSelectAttributes |
object | javascript object containing fill, color and stroke properties for select highlight of Space Object roompolygons |
cvjsPopUpBody |
object | html/css styled object containing the content of the modal when selecting Space Objects |
cvjsPopUpBody2 |
object | second html/css styled object containing the content of the modal when selecting Space Objects, internally controlled based on type of Space Object |
cvjs_InitializeSVGHyperlinkClick(floorplan_div)
Initialize xlink SVG Hyperlinks with click handler so mouse click are caught, and adds a tooltip with the xlink displayed. The return method on mouseclick is: cvjs_OnHyperlinkClick(xlink_id);
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer JS canvas |
cvjs_insertImageLink(floorplan_div)
Insert image link
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer JS canvas |
cvjs_interactiveLayerOff(floorplan_div)
Turn a single layer on interactively
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | div of the CADViewerJS canvas |
cvjs_LayerList(floorplan_div)
Open the Layer List menu for layer handling
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer JS canvas |
cvjs_LayerListSpaceObject(floorplan_div, mode)
Opens the layer list for Space Objects for setting of Room/Text Layer processing
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer JS canvas |
mode |
int | mode=1 , rl/tl selection, mode=2, hl selection , mode = 3, layer for SpaceID selection in floodfil process |
cvjs_layerNamefromObjectID(myObjectId) → {string}
Return orginal file layer name based on SVG object ID
Parameters:
Name | Type | Description |
---|---|---|
myObjectId |
string | id of the element in the SVG file |
Returns:
layer - layer name
- Type
- string
cvjs_LayerOff(layer)
Turn single general layer on, either defined individually or as a Object Space layer or Text on a Space object - Sticky Notes and Redlines are differentiated.
Parameters:
Name | Type | Description |
---|---|---|
layer |
string | name of layer to turn off |
cvjs_LayerOn(layer)
Turn single general layer on, either defined individually or as a Object Space layer or Text on a Space object - Sticky Notes and Redlines are differentiated.
Parameters:
Name | Type | Description |
---|---|---|
layer |
string | name of layer to turn on |
cvjs_LayerOn_AllOff(layer)
Turn single Object Space layer on, turn all other layers off - Object Spaces, Sticky Notes and Redlines are differentiated.
Parameters:
Name | Type | Description |
---|---|---|
layer |
string | name of layer to turn on |
cvjs_LayerOn_OthersOff()
Turn single Object Space layer on, turn all other layers off - Object Spaces, Sticky Notes and Redlines are differentiated.
cvjs_loadAllImageLinks(floorplan_div)
Load all object image links
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer JS canvas |
cvjs_loadBitmapsViaServerPath(mode)
Enables bitmaps to be loaded via server handler instead of direct load
Parameters:
Name | Type | Description |
---|---|---|
mode |
boolean | true for bitmap file load through server handler |
cvjs_loadCustomSVGLayer(fileName, floorplan_div, layer)
Loads a SVG file into a custom layer
Parameters:
Name | Type | Description |
---|---|---|
fileName |
string | name and path of SVG file to load |
floorplan_div |
string | name of on which CADViewer JS is located |
layer |
object | Layer on which to place the file content |
cvjs_LoadDrawing(floorplan_div, FileName)
Loads a drawing into CADViewer JS, this method can only be used after intialization of CADViewer JS through the cvjs_InitCADViewerJS_ methods
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | the SVG canvas object to which CADViewer JS is allocated |
FileName |
string | the name and path to the location of the CADViewer JS drawing files to load in, the path is either absolute or relative to the document in which CADViewer JS is invoked |
cvjs_LoadDrawing(floorplan_div, FileNamePath, FileNameNoExtension, serverCallBack)
Loads a drawing into CADViewer JS, this method can only be used after intialization of CADViewer JS through the cvjs_InitCADViewerJS_ methods
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | the SVG canvas object to which CADViewer JS is allocated |
FileNamePath |
string | the filepath to the location of the CADViewer JS drawing files to load in, the path is either absolute or relative to the document in which CADViewer JS is invoked |
FileNameNoExtension |
string | file name of the drawing without extension (CADViewer JS will automatically genrate naming and load in files associated with the file name) |
serverCallBack |
boolean | set to false or undefined. |
cvjs_LoadDrawing_Conversion(floorplan_div, originatingContent, FileNameNoExtension, originatingUsername, originatingPassword)
Loads a DWG drawing into CADViewer JS, this method can only be used after intialization of CADViewer JS through the cvjs_InitCADViewerJS_ methods
The method connects to the TailorMade Restful API for conversion of DWG, DXF,DWF and DGN,PCF files
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | the SVG canvas object to which CADViewer JS is allocated |
originatingContent |
string | the originating content, can be a http path to location, local server side path, stream link or 64 base encoded data |
FileNameNoExtension |
string | file name of the drawing without extension - CADViewer JS will automatically generate naming |
originatingUsername |
string | if the originating file is username/password protected , "" if no username |
originatingPassword |
string | if the originating file is username/password protected , "" if no password |
cvjs_LoadDrawing_SVG(floorplan_div, FileNamePath, FileName, ScriptPath)
Loads a SVG drawing into CADViewer JS, this method can only be used after intialization of CADViewer JS through the cvjs_InitCADViewerJS_ methods
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | the SVG canvas object to which CADViewer JS is allocated |
FileNamePath |
string | the filepath to the location of the SVG drawing files to load in, the path is either absolute or relative to the document in which CADViewer JS is invoked |
FileName |
string | file name of the SVG drawing |
ScriptPath |
string | relative location of the javascript folder from the calling document |
cvjs_loadDrawingsWithSpaceObjects(floorplan_div)
Opens the File Loader Modal to load and convert drawing with space objects
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer JS canvas |
cvjs_loadSpaceObjects(floorplan_div)
Loads Space Object to the location defined through parameter settings
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
String | div of the CADViewerJS canvas |
cvjs_loadStamp(fileName, floorplan_div, layer)
Loads an stamp file into a custom layer
Parameters:
Name | Type | Description |
---|---|---|
fileName |
string | name and path of SVG file to load |
floorplan_div |
string | name of on which CADViewer JS is located |
layer |
object | Layer on which to place the file content |
cvjs_loadStickyNotesRedlines(floorplan_div)
Loads redlines and sticky notes to the location defined through parameter settings
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
String | div of the CADViewerJS canvas |
cvjs_lockAllRedlines_ExceptCurrentUser()
Lock all redlines except current userId
cvjs_lockAllRedlines_ExceptUser(userId)
Lock all redlines except named userId
Parameters:
Name | Type | Description |
---|---|---|
userId |
string | the userId to be editable, all other locked |
cvjs_lockAllRedlines_LockedUsersList()
Lock all redlines with userId on the Lock Users List
cvjs_make_collab_presenter(floorplan_div)
Take control and become the presenter in collab sessiojn
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer JS canvas |
cvjs_makeLegendUpperRight(upperRightDeltaX, upperRightDeltaX, scaleTextArr, textStringArr, textStylesArr-, hexColorTextArr, legendColorArr)
Make a legend in the upper right location of the drawings with color codes and text description
Parameters:
Name | Type | Description |
---|---|---|
upperRightDeltaX |
float | delta x value, the Legend is moved this relative value to the right of drawing extents, value between 0 and 1 |
upperRightDeltaX |
float | delta y value, the Legend is moved this relative value from the top of the drawing extents, value between 0 and 1 |
scaleTextArr |
Array.<float> | Array with the legends text heigth, on a per line basis, value between 0 and 1 as the relative value of the drawing height |
textStringArr |
Array.<string> | Array with the legends text to be displayed on a per line basis |
textStylesArr- |
Array.<string> | Array with the text styles of each legend |
hexColorTextArr |
Array.<string> | Array with the hex colors on each text legends |
legendColorArr |
Array.<string> | Array with the hex colors of the color box associated with each legend text |
cvjs_makeLegendUpperRightDiv(upperRightDeltaX, upperRightDeltaX, scaleTextArr, textStringArr, textStylesArr-, hexColorTextArr, legendColorArr, floorplan_div, highlight_handles_style_object)
Make a legend in the upper right location of the drawings with color codes and text description
Parameters:
Name | Type | Description |
---|---|---|
upperRightDeltaX |
float | delta x value, the Legend is moved this relative value to the right of drawing extents, value between 0 and 1 |
upperRightDeltaX |
float | delta y value, the Legend is moved this relative value from the top of the drawing extents, value between 0 and 1 |
scaleTextArr |
Array.<float> | Array with the legends text heigth, on a per line basis, value between 0 and 1 as the relative value of the drawing height |
textStringArr |
Array.<string> | Array with the legends text to be displayed on a per line basis |
textStylesArr- |
Array.<string> | Array with the text styles of each legend |
hexColorTextArr |
Array.<string> | Array with the hex colors on each text legends |
legendColorArr |
Array.<string> | Array with the hex colors of the color box associated with each legend text |
floorplan_div |
string | name of div containing CADViewer JS canvas |
highlight_handles_style_object |
Object | object with the styles used for highlight |
cvjs_makeStampUpperRight(upperRightDeltaX, upperRightDeltaX, scaleTextArr, textStringArr, textStylesArr-, hexColorTextArr, legendColorArr)
Make a stamp in the upper right location of the drawings with color codes and text description
Parameters:
Name | Type | Description |
---|---|---|
upperRightDeltaX |
float | delta x value, the Legend is moved this relative value to the right of drawing extents, value between 0 and 1 |
upperRightDeltaX |
float | delta y value, the Legend is moved this relative value from the top of the drawing extents, value between 0 and 1 |
scaleTextArr |
Array.<float> | Array with the legends text heigth, on a per line basis, value between 0 and 1 as the relative value of the drawing height |
textStringArr |
Array.<string> | Array with the legends text to be displayed on a per line basis |
textStylesArr- |
Array.<string> | Array with the text styles of each legend |
hexColorTextArr |
Array.<string> | Array with the hex colors on each text legends |
legendColorArr |
Array.<string> | Array with the hex colors of the color box associated with each legend text |
cvjs_makeStampUpperRightDiv(upperRightDeltaX, upperRightDeltaX, roomLayer, headerScale, headerStringArrr, headerStyle, headerHexColor, scaleTextArr, textStringArr, textStylesArr-, hexColorTextArr, hexColorFrame, floorplan_div)
Make a stamp in the upper right location of the drawings with color codes and text description
Parameters:
Name | Type | Description |
---|---|---|
upperRightDeltaX |
float | delta x value, the Legend is moved this relative value to the right of drawing extents, value between 0 and 1 |
upperRightDeltaX |
float | delta y value, the Legend is moved this relative value from the top of the drawing extents, value between 0 and 1 |
roomLayer |
string | name of layer to draw stamp |
headerScale |
float | Header text heigth, on a per line basis, value between 0 and 1 as the relative value of the drawing height |
headerStringArrr |
Array.<string> | Array with the header text to be displayed on a per line basis |
headerStyle |
object | Style array of the header text |
headerHexColor |
string | Hex color of header text |
scaleTextArr |
Array.<float> | Array with the legends text heigth, on a per line basis, value between 0 and 1 as the relative value of the drawing height |
textStringArr |
Array.<string> | Array with the legends text to be displayed on a per line basis |
textStylesArr- |
Array.<string> | Array with the text styles of each legend |
hexColorTextArr |
Array.<string> | Array with the hex colors on each text legends |
hexColorFrame |
string | Hex color of the frame |
floorplan_div |
string | name of div containing CADViewer JS canvas |
cvjs_Measurement(floorplan_div)
Calibrate measurement
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
String | div of the CADViewerJS canvas |
cvjs_mergeDXFDWG(floorplan_div)
Merge redline content into original DWG for re-distribution
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer JS canvas |
cvjs_mergePDFwithRedlines(filePath, urlPath, fileName, floorplan_div)
Saves a floorplan with overlays as SVG file
Parameters:
Name | Type | Description |
---|---|---|
filePath |
string | location of the files to be merged, server side |
urlPath |
string | url location of the files to be merged |
fileName |
string | name of the pdf document to be merged, _red pdf pages will be merged into a document _red_merged |
floorplan_div |
string | name of on which CADViewer JS is located |
cvjs_mergeQR(floorPlan_div)
Function to merge a QR into a drawing for download
Parameters:
Name | Type | Description |
---|---|---|
floorPlan_div |
String | name of the div that contains CADViewer JS |
cvjs_multipagePDFtoSVG_PhpLoad(moade)
Load multipage PDF converter to SVG through php
Parameters:
Name | Type | Description |
---|---|---|
moade |
flag | loading converted SVG from PDF via php, default is false and direct load of svg |
cvjs_NameObjectClicked() → {string}
Identify the name of the last Object Space selected - Object Spaces, Sticky Notes and Redlines are differentiated.
Returns:
Name - The Name is (-1) in case of no current object selected
- Type
- string
cvjs_newLayer(layer) → {object}
Creates a new layer
Parameters:
Name | Type | Description |
---|---|---|
layer |
string | name of layer to be created |
Returns:
layerObject - Returns a new layer as a group on the SVG canvas
- Type
- object
cvjs_newLayerDiv(layer, floorplan_div) → {object}
Creates a new layer
Parameters:
Name | Type | Description |
---|---|---|
layer |
string | name of layer to be created |
floorplan_div |
string | name of floorplan div |
Returns:
layerObject - Returns a new layer as a group on the SVG canvas
- Type
- object
cvjs_NodeObjectClicked() → {string}
Identify the node identifier of the last Object Space selected - Object Spaces, Sticky Notes and Redlines are differentiated.
Returns:
nodeId - The nodeId is (-1) in case of no current object selected
- Type
- string
cvjs_openFileLoadToServer(floorplan_div)
Calls the file manager, set the enable file manager load to true prior to calling this method
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | the div of the CADViewerJS canvas |
cvjs_openHyperlinkInNewWindow(openLinkFlag, windowWidth, windowHeight)
Controls hyperlinks, so if click on a hyperlink shall open the link in the same instance or open the link in a new window. Default is false.
Parameters:
Name | Type | Description |
---|---|---|
openLinkFlag |
boolean | true if to open links in new window, false otherwise |
windowWidth |
int | width of new popup window, set an arbitary value if openLinkFlag is false |
windowHeight |
int | height of new popup window, set an arbitary value if openLinkFlag is false |
cvjs_overwriteDefaultDeviceSettings(mode)
Overwrite default icon menu settings on devices
Parameters:
Name | Type | Description |
---|---|---|
mode |
boolean | true: sets the icon menu on devices similar to desktop environment, false: do not change default. False is default |
cvjs_PageChangeList(floorplan_div)
Open the Page Change menu to select a page in a multipage drawing
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer JS canvas |
cvjs_Print(floorplan_div)
Funtion to open print model, interactively set paper size, resolution and orientation and then print
API method linked to icon interface
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer JS canvas |
cvjs_printCanvasPaperSize()
Function to print to papersize, based on settings provided in cvjs_setPrintOrientation(), cvjs_setPrintResolutionDpi() and cvjs_setPrintPaperSize()
cvjs_printScreenAsPDFwithRedlines(floorplan_div)
Saves a floorplan with overlays as SVG file, then embed it into a pdf and display in own window
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of on which CADViewer JS is located |
cvjs_printToPdf_windowRelativeSize(scale)
Sets the size of the print window as a relation of the screen between 0 and 1
Parameters:
Name | Type | Description |
---|---|---|
scale |
float | the size of the print window as a relation of the screen between 0 and 1, default is 0.4 |
cvjs_publishPDF_modal_hide(floorplan_div)
Publish redlined content as PDF
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer JS canvas |
cvjs_quickCount(floorplan_div)
Activate quick count,
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer JS canvas |
cvjs_removePrintObjectAfterPrint(flag)
Set flag to clean temporary print object after use. Requires the cvjs_setServerHandlersPath() general php folder location to be defined with an absolute path
Parameters:
Name | Type | Description |
---|---|---|
flag |
boolean | true for remove, false to leave as is |
cvjs_resetInitialization_FloorplanDiv()
Reset the initialization of floorplans
cvjs_resetSVGHyperlinkColors()
Reset colors on xlink SVG Hyperlinks. The hyperlinks are typically transparent, but can be controlled to do interactive highlight.-
cvjs_resetTextOnSpaceObject(nodeUnderbar)
Reset the location and size of text objects drawn on Space Object
Parameters:
Name | Type | Description |
---|---|---|
nodeUnderbar |
string | the data node containing the Space Object to which the text is associated |
cvjs_resetTextOnSpaceObject_Id(name-)
Reset the location and size of text objects drawn on Space Object
Parameters:
Name | Type | Description |
---|---|---|
name- |
string | id of the data node containing the Space Object to which the text is associated |
cvjs_resetTextOnSpaceObject_Name(name-)
Reset the location and size of text objects drawn on Space Object
Parameters:
Name | Type | Description |
---|---|---|
name- |
string | name of the data node containing the Space Object to which the text is associated, the first occurance of the name is selected |
cvjs_resizeWindow_fixedSize(widthFloorplan, heightFloorplan, floorplan)
Resize CADViewer JS canvas after browser window changes, automatic adjustment based on canvas size and location
Parameters:
Name | Type | Description |
---|---|---|
widthFloorplan |
float | width of containing element in pixels |
heightFloorplan |
float | height of containing element in pixels |
floorplan |
string | name of SVG element containing canvas |
cvjs_resizeWindow_position(floorplan)
Resize CADViewer JS canvas after browser window changes, automatic adjustment based on canvas size and location
Parameters:
Name | Type | Description |
---|---|---|
floorplan |
string | name of SVG element containing canvas |
cvjs_restApiController()
Returns the recommended conversion engine php controller for this library, use this to intialize the conversion server setup, this value gets overwritten using cvjs_Init_ConversionServer
cvjs_restApiControllerLocation()
Returns the recommended conversion engine php controller location for this library, use this to intialize the conversion server setup, this value gets overwritten using cvjs_Init_ConversionServer
cvjs_restApiConverter()
Returns the recommended converter for this library
cvjs_restApiConverterVersion()
Returns the minimum recommended converter version number for this library
cvjs_rotateAngle(angle, floorplan_div)
Rotates an angle based from 0
Parameters:
Name | Type | Description |
---|---|---|
angle |
float | rotation angle |
floorplan_div |
string | name of on which CADViewer JS is located |
cvjs_rotateBackward(floorplan_div)
Rotates 90 degrees forward
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of on which CADViewer JS is located |
cvjs_rotateForward(floorplan_div)
Rotates 90 degrees forward
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of on which CADViewer JS is located |
cvjs_saveAllImageLinks(floorplan_div)
Saves all image links
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer JS canvas |
cvjs_saveAsSVG(floorplan_div)
Save current object as SVG, including redlines and space objects
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of on which CADViewer JS is located |
cvjs_saveAsSVGOnServer(floorplan_div, FileLocation)
Save current object as SVG, including redlines and space objects
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of on which CADViewer JS is located |
FileLocation |
string | name of file to save |
cvjs_saveCustomSVGLayer(fileName, floorplan_div, layer)
Saves a custom layer as SVG file
Parameters:
Name | Type | Description |
---|---|---|
fileName |
string | name and path of file to save to |
floorplan_div |
string | name of on which CADViewer JS is located |
layer |
object | Layer with custom information |
cvjs_saveFloorplanAsPDF(fileName, floorplan_div)
Saves a floorplan with overlays as PDF file
Parameters:
Name | Type | Description |
---|---|---|
fileName |
string | name and path of file to save to |
floorplan_div |
string | name of on which CADViewer JS is located |
cvjs_saveFloorplanAsPDFtoSharePoint(fileName, floorplan_div, sharepointFolder, sharepointUserName)
Saves a floorplan with overlays as PDF file, upload to SharePoint folder
Parameters:
Name | Type | Description |
---|---|---|
fileName |
string | name and path of file to save to |
floorplan_div |
string | name of on which CADViewer JS is located |
sharepointFolder |
string | name of SharePoint upload folder |
sharepointUserName |
string | name of SharePointUser |
cvjs_saveFloorplanAsSVG(fileName, floorplan_div)
Saves a floorplan with overlays as SVG file
Parameters:
Name | Type | Description |
---|---|---|
fileName |
string | name and path of file to save to |
floorplan_div |
string | name of on which CADViewer JS is located |
cvjs_saveScreenAsImage(serverPath, image_fileName)
Save screen image to server as well as list of stickyNote content and information
On the server two thumbnails are created
Parameters:
Name | Type | Description |
---|---|---|
serverPath |
string | path on Server to save image content |
image_fileName |
string | name of image file on server. |
cvjs_saveScreenAsImage_makeTumbnails(serverPath, image_fileName, sizeThumb1, thumb1_fileName, sizeThumb2, thumb2_fileName)
Save screen image to server
On the server two thumbnails are created
Parameters:
Name | Type | Description |
---|---|---|
serverPath |
string | path on Server to save image content and create thumbnails |
image_fileName |
string | name of image file on server. The file with sticky note content will be named fileName.txt |
sizeThumb1 |
int | size in pixels of thumbnail one |
thumb1_fileName |
string | filename of thumbnail one on server |
sizeThumb2 |
int | size in pixels of thumbnail two |
thumb2_fileName |
string | filename of thumbnail two on server |
cvjs_saveScreenAsImage_stickyNoteInfo_makeTumbnails(serverPath, image_fileName, sizeThumb1, thumb1_fileName, sizeThumb2, thumb2_fileName)
Save screen image to server as well as list of stickyNote content and information
On the server two thumbnails are created
Parameters:
Name | Type | Description |
---|---|---|
serverPath |
string | path on Server to save image content and create thumbnails |
image_fileName |
string | name of image file on server. The file with sticky note content will be named fileName.txt |
sizeThumb1 |
int | size in pixels of thumbnail one |
thumb1_fileName |
string | filename of thumbnail one on server |
sizeThumb2 |
int | size in pixels of thumbnail two |
thumb2_fileName |
string | filename of thumbnail two on server |
cvjs_saveScreenAsPDF(pageOrientation, pageSize, pageResolution)
Captures the screen image and creates a single page PDF
Parameters:
Name | Type | Description |
---|---|---|
pageOrientation |
string | Orientation of drawings: landscape/portrait |
pageSize |
string | Papersize of drawing |
pageResolution |
string | Page resolution in dpi, default is 300 |
cvjs_saveScreenAsPDF_email(pageOrientation, pageSize, pageResolution, floorplan_div)
Captures the screen image and creates a single page PDF, which is attached to email
Parameters:
Name | Type | Description |
---|---|---|
pageOrientation |
string | Orientation of drawings: landscape/portrait |
pageSize |
string | Papersize of drawing |
pageResolution |
string | Page resolution in dpi, default is 300 |
floorplan_div |
string | div on which CADViewer JS is places |
cvjs_saveScreenAsPDF_uploadServer(pageOrientation, pageSize, pageResolution, floorplan_div)
Captures the screen image and creates a single page PDF, which is uploaded to Sharepoint server
Parameters:
Name | Type | Description |
---|---|---|
pageOrientation |
string | Orientation of drawings: landscape/portrait |
pageSize |
string | Papersize of drawing |
pageResolution |
string | Page resolution in dpi, default is 300 |
floorplan_div |
string | div on which CADViewer JS is places |
cvjs_saveStamp(fileName, floorplan_div, layer)
Saves a stamp layer to a file
Parameters:
Name | Type | Description |
---|---|---|
fileName |
string | name and path of file to save to |
floorplan_div |
string | name of on which CADViewer JS is located |
layer |
object | Layer with custom information , roomLayer |
cvjs_saveStickyNoteInfo(fileName, floorplan_div)
Saves all stickynote content as - xml wrapped content: userid, id, name, date, text, page
Parameters:
Name | Type | Description |
---|---|---|
fileName |
string | name and path of file to save to |
floorplan_div |
string | name of on which CADViewer JS is located |
cvjs_saveStickyNotesRedlines(floorplan_div)
Saves redlines and sticky notes to the location defined through parameter settings
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
String | div of the CADViewerJS canvas |
cvjs_searchReplaceText(searchString, replaceString)
Text Search; finds a text string in the drawing, and zooms over the search result
Parameters:
Name | Type | Description |
---|---|---|
searchString |
string | the text string to search after |
replaceString |
string | the text string to replace with |
cvjs_searchText(searchString, zoomFactor)
Text Search; finds a text string in the drawing, and zooms over the search result
Parameters:
Name | Type | Description |
---|---|---|
searchString |
string | the text string to search after |
zoomFactor |
int | zoom factor of the seach result in percentage of zoom extents |
cvjs_searchTextInstance(searchString, zoomFactor, textInstance)
Text Search; finds a text string in the drawing, and zooms over the search result
Parameters:
Name | Type | Description |
---|---|---|
searchString |
string | the text string to search after |
zoomFactor |
int | zoom factor of the seach result in percentage of zoom extents |
textInstance |
int | if multiple entries of text object, load instance, the first instance is 1 |
cvjs_setAttributeInSpaceObjectNode(NodeId, name, value)
Sets an attribute value in a Space Object
Parameters:
Name | Type | Description |
---|---|---|
NodeId |
string | Node id of the Space Object in which to retrive an attribute |
name |
string | name of attribute (name, value) pair |
value |
string | name of attribute (name, value) pair to be set |
cvjs_setAttributeStatus(NodeId, attributeStatus)
Retrieves the attribute status from a Space Object
Parameters:
Name | Type | Description |
---|---|---|
NodeId |
string | Node id of the Space Object in which to retrive the status |
attributeStatus |
string | attributeStatus of the node, "populated" or "unpopulated" |
cvjs_setBackgroundColor(floorplan_div)
Calls modal for setting background color
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer JS canvas |
cvjs_setBackgroundColorHex(color, floorplan_div)
Set the background color of CADViewer JS canvas, using HEX
Parameters:
Name | Type | Description |
---|---|---|
color |
hex | of background, hex string, omit # |
floorplan_div |
string | name of div containing CADViewer JS canvas |
cvjs_setCallbackForModalDisplay(callbacForkModalDisplay, customModalPopUpBody, populateMyCustomModalPopUpBody)
Space Object modals control for external retrieval of modal data.
Parameters:
Name | Type | Description |
---|---|---|
callbacForkModalDisplay |
boolean | false: standard modal on Space Object click as defined through setup method: InitCADViewerJS_ , true: if attributesStatus in the data-field of object is "unpopulated" a call is made to external method cvjs_callbackForModalDisplay(), if attributeStatus is "populated", modal is displayed. |
customModalPopUpBody |
function | : method that defines the body of the popup model |
populateMyCustomModalPopUpBody |
function | : method that populates the body of the popup model, this method is called when a space is selected so the display of modal content will match the modal selected |
cvjs_setCallbackMeasurement(callbackMode)
Sets measurements to be echoed through method cvjs_measurementCallback(cvjs_currentMeasurementLength, cvjs_units[cvjs_active_floorplan_div_nr]);
Parameters:
Name | Type | Description |
---|---|---|
callbackMode |
boolean | false is default, true if measurement shall be echoed through method |
cvjs_setCallbackQuickCount(callbackMode)
Sets quickcounts to be echoed through method cvjs_QuickCountCallback(cvjs_quickCountCounter);
Parameters:
Name | Type | Description |
---|---|---|
callbackMode |
boolean | false is default, true if Quick Counts shall be echoed through method |
cvjs_setCollaborationServerFolder(server_path)
Sets the server path for collaboration content
Parameters:
Name | Type | Description |
---|---|---|
server_path |
string | : default is "C:\\xampp\\htdocs\\CV-JS_2_4_1\\php\\collaboration\\"; |
cvjs_setCollaborationServerUrl(url_name)
Sets the server Url for collaboration content
Parameters:
Name | Type | Description |
---|---|---|
url_name |
string | : default is "../php/collaboration/"; |
cvjs_setCollaborationSessionName(sessions_name)
Sets the sessions name for the collaboration session
Parameters:
Name | Type | Description |
---|---|---|
sessions_name |
string | : name of the session. This name will be a server entity of same name containing all content relevant to the session |
cvjs_setCompareDrawings_LoadSecondDrawingDirect(floorplan_div, fileName)
Sets the name of the second drawing for compare load, bypassing load modal
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer JS canvas |
fileName |
string | name of drawing |
cvjs_setCompareDrawings_StandardModal(floorplan_div)
Second drawing in compare files are set to be loaded via modal - default action
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer JS canvas |
cvjs_setConverter(converter, version)
Set the AutoXchange converter name and version to be used for the Rest conversion call
Parameters:
Name | Type | Description |
---|---|---|
converter |
string | converter name |
version |
string | converter version |
cvjs_setConverterCredentials(username, password)
Set the username and password to be used for the Rest conversion call
Parameters:
Name | Type | Description |
---|---|---|
username |
string | username on the Rest server where AutoXchange is installed |
password |
string | password on the Rest server where AutoXchange is installed |
cvjs_setCreationMode(cvjs_creationMode)
Sets the display mode of Space Object modals
Parameters:
Name | Type | Description |
---|---|---|
cvjs_creationMode |
boolean | false: standard modal on Space Object click as defined through setup method: InitCADViewerJS_ , true: modal is supressed, tooltip is ID of object, color setting is defined through the "linked" database field of the object. |
cvjs_setCurrentMeasurementUnits(floorplan_div, units, svgToWorldUnit)
Sets Unit and Measurement World Unit Transformation on current page
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of on which CADViewer JS is located |
units |
string | Measurement Unit (mmn, cm, m, feet, inch) |
svgToWorldUnit |
float | conversion factor for measurements |
cvjs_setCurrentNodeValues(currentNode_underbar, currentNode_name, currentNode_id, currentNode_layer, currentNode_group, currentNode_attributes, currentNode_attributeStatus, currentNode_type, currentNode_tags, currentNode_occupancy, currentNode_linked)
Sets the current Space Node values, these settings will be used to intialize space objects subsequently drawn with the draw methods
Parameters:
Name | Type | Description |
---|---|---|
currentNode_underbar |
string | the NodeId linking data with graphical objects, of the form "NODE_xxx", where xxx is a number |
currentNode_name |
string | name of the space object to be visualized at the modal header |
currentNode_id |
string | id of the object, used for pop-up highlight in "non-modal display" and for linking Space Objects with database entries |
currentNode_layer |
string | layer of the Space Object |
currentNode_group |
string | group of the Space Object |
currentNode_attributes |
string | a list of attributes for the Space Object |
currentNode_attributeStatus |
string | status of attributes list, can be populated or unpopulated, controls if data is pulled externally |
currentNode_type |
string | the type attribute of the Space Object, the type is displayed at the modal header |
currentNode_tags |
string | list of tags assocated with the object, for retrieval at custom developed highlight |
currentNode_occupancy |
string | tag to describe occupancy, for retrieval at custom developed highlight |
currentNode_linked |
boolean | boolean variable to tell if object is associated with a database object or not. Depending on this flag highlight will differ. deprecated |
cvjs_setCurrentRedlineValues(currentRedline_underbar, currentRedline_name, currentRedline_id, currentRedline_layer, currentRedline_group, currentRedline_color, currentRedline_StrokeWidth, currentRedline_drawingRotation)
Sets the current Redlines values, these settings will be used to intialize redlines subsequently drawn with the draw methods
Parameters:
Name | Type | Description |
---|---|---|
currentRedline_underbar |
string | the NodeId linking data with graphical objects, of the form "RED_xxx", where xxx is a number |
currentRedline_name |
string | id of the Redline, association to user producing markup |
currentRedline_id |
string | id of the Redline |
currentRedline_layer |
string | layer of the Redline |
currentRedline_group |
string | group of the Redline |
currentRedline_color |
string | color of the Redline as a hex values, for example "#FF0000". |
currentRedline_StrokeWidth |
float | width of the Redline |
currentRedline_drawingRotation |
int | rotation angle of drawing |
cvjs_setCurrentRedlineValues_All(currentRedline_underbar, currentRedline_name, currentRedline_id, currentRedline_layer, currentRedline_group, currentRedline_color, currentRedline_StrokeWidth, currentRedline_fill, currentRedline_fill_opacity, currentRedline_transform, currentRedline_username, currentRedline_userid, currentRedline_currentPage, currentRedline_polypath_arrow, currentRedline_triangle_design, currentRedline_redline_text, currentRedline_drawingRotation)
Sets the current Redlines values, these settings will be used to intialize redlines subsequently drawn with the draw methods
Parameters:
Name | Type | Description |
---|---|---|
currentRedline_underbar |
string | the NodeId linking data with graphical objects, of the form "RED_xxx", where xxx is a number |
currentRedline_name |
string | id of the Redline, association to user producing markup |
currentRedline_id |
string | id of the Redline |
currentRedline_layer |
string | layer of the Redline |
currentRedline_group |
string | group of the Redline |
currentRedline_color |
string | color of the Redline as a hex values, for example "#FF0000". |
currentRedline_StrokeWidth |
float | width of the Redline |
currentRedline_fill |
string | color of the Redline fill values, for example "#FF0000". |
currentRedline_fill_opacity |
float | fill opacity of filled redline |
currentRedline_transform |
string | transform (redline arrow only) |
currentRedline_username |
string | redline username |
currentRedline_userid |
string | redline userid |
currentRedline_currentPage |
int | page on which the redline is |
currentRedline_polypath_arrow |
string | arrow redline geometry |
currentRedline_triangle_design |
string | arrow redline geometry |
currentRedline_redline_text |
string | text object in redline text |
currentRedline_drawingRotation |
string | rotation of the page the redline is done on |
cvjs_setCurrentRedlineValues_Color(currentRedline_color)
Sets the current Redlines value
Parameters:
Name | Type | Description |
---|---|---|
currentRedline_color |
string | color of the Redline as a hex values, for example "#FF0000". |
cvjs_setCurrentRedlineValues_ColorStokeWidth(currentRedline_color, currentRedline_StrokeWidth)
Sets the current Redlines values, color, strokewidth only, these settings will be used to intialize redlines subsequently drawn with the draw methods
Parameters:
Name | Type | Description |
---|---|---|
currentRedline_color |
string | color of the Redline as a hex values, for example "#FF0000". |
currentRedline_StrokeWidth |
float | width of the Redline |
cvjs_setCurrentRedlineValues_NameUserid(currentRedline_userid)
Sets the current Redlines name and userid values, these settings will be used to intialize redlines subsequently drawn with the draw methods
Parameters:
Name | Type | Description |
---|---|---|
currentRedline_userid |
string | redline userid |
cvjs_setCurrentRedlineValues_StokeWidth(currentRedline_StrokeWidth)
Sets the current Redlines value
Parameters:
Name | Type | Description |
---|---|---|
currentRedline_StrokeWidth |
float | width of the Redline |
cvjs_setCurrentRedlineValues_Userid(currentRedline_userid)
Sets the current Redlines values, these settings will be used to intialize redlines subsequently drawn with the draw methods
Parameters:
Name | Type | Description |
---|---|---|
currentRedline_userid |
string | redline userid |
cvjs_setCurrentSpaceObjectNodeValues(currentNode_underbar, currentNode_name, currentNode_id, currentNode_layer, currentNode_group, currentNode_attributes, currentNode_attributeStatus, currentNode_type, currentNode_tags, currentNode_occupancy, currentNode_linked)
Sets the current Space Node values, these settings will be used to intialize space objects subsequently drawn with the draw methods
Parameters:
Name | Type | Description |
---|---|---|
currentNode_underbar |
string | the NodeId linking data with graphical obejcts, of the form "NODE_xxx", where xxx is a number |
currentNode_name |
string | name of the space object to be visualized at the modal header |
currentNode_id |
string | id of the object, used for pop-up highlight in "non-modal display" and for linking Space Objects with database entries |
currentNode_layer |
string | layer of the Space Object |
currentNode_group |
string | group of the Space Object |
currentNode_attributes |
string | a list of attributes for the Space Object |
currentNode_attributeStatus |
string | status of attributes list, can be populated or unpopulated, controls if data is pulled externally |
currentNode_type |
string | the type attribute of the Space Object, the type is displayed at the modal header |
currentNode_tags |
string | list of tags assocated with the object, for retrieval at custom developed highlight |
currentNode_occupancy |
string | tag to describe occupancy, for retrieval at custom developed highlight |
currentNode_linked |
boolean | boolean variable to tell if object is associated with a database object or not. Depending on this flag highlight will differ. |
cvjs_setCurrentStickyNoteValues(currentStickyNote_underbar, currentStickyNote_name, currentStickyNote_id, currentStickyNote_layer, currentStickyNote_group, currentStickyNote_text, currentStickyNote_userid, currentStickyNote_date, currentStickyNote_linked)
Sets the current Sticky Note values, these settings will be used to intialize Sticky Notes subsequently drawn with the draw methods
Parameters:
Name | Type | Description |
---|---|---|
currentStickyNote_underbar |
string | the NodeId linking data with graphical objects, of the form "NOTE_xxx", where xxx is a number |
currentStickyNote_name |
string | name of the Sticky Note - user name displayed at StickyNote modal |
currentStickyNote_id |
string | id of the Sticky Note object, used for pop-up highlight |
currentStickyNote_layer |
string | layer of the Sticky Note |
currentStickyNote_group |
string | group of the Sticky Note |
currentStickyNote_text |
string | text in the Sticky Note textfield, typically this is initially empty as users interactively add text to StickyNotes. |
currentStickyNote_userid |
string | UserID of StickyNotes. |
currentStickyNote_date |
string | creation date of the StickyNotes. |
currentStickyNote_linked |
boolean | boolean variable to tell if object is linked or not, internally controlled |
cvjs_setCurrentStickyNoteValues_All(currentStickyNote_underbar, currentStickyNote_name, currentStickyNote_id, currentStickyNote_layer, currentStickyNote_group, currentStickyNote_text, currentStickyNote_userid, currentStickyNote_date, currentStickyNote_linked, currentStickyNote_transform, currentStickyNote_currentPage, currentStickyNote_drawingRotation)
Sets the current Sticky Note values, these settings will be used to intialize Sticky Notes subsequently drawn with the draw methods
Parameters:
Name | Type | Description |
---|---|---|
currentStickyNote_underbar |
string | the NodeId linking data with graphical objects, of the form "NOTE_xxx", where xxx is a number |
currentStickyNote_name |
string | name of the Sticky Note - user name displayed at StickyNote modal |
currentStickyNote_id |
string | id of the Sticky Note object, used for pop-up highlight |
currentStickyNote_layer |
string | layer of the Sticky Note |
currentStickyNote_group |
string | group of the Sticky Note |
currentStickyNote_text |
string | text in the Sticky Note textfield, typically this is initially empty as users interactively add text to StickyNotes. |
currentStickyNote_userid |
string | UserID of StickyNotes. |
currentStickyNote_date |
string | creation date of the StickyNotes. |
currentStickyNote_linked |
boolean | boolean variable to tell if object is linked or not, internally controlled |
currentStickyNote_transform |
boolean | transformation of note |
currentStickyNote_currentPage |
string | page on which the note is on |
currentStickyNote_drawingRotation |
int | rotation of page on which the note is on |
cvjs_setCurrentStickyNoteValues_NameUserId(currentStickyNote_name, currentStickyNote_userid)
Sets the current Sticky Note values, these settings will be used to intialize Sticky Notes subsequently drawn with the draw methods
Parameters:
Name | Type | Description |
---|---|---|
currentStickyNote_name |
string | name of the Sticky Note - user name displayed at StickyNote modal |
currentStickyNote_userid |
string | UserID of StickyNotes. |
cvjs_setCurrentStickyNoteValues_NameUserIdDate(currentStickyNote_name, currentStickyNote_userid, currentStickyNote_date)
Sets the current Sticky Note values, these settings will be used to intialize Sticky Notes subsequently drawn with the draw methods
Parameters:
Name | Type | Description |
---|---|---|
currentStickyNote_name |
string | name of the Sticky Note - user name displayed at StickyNote modal |
currentStickyNote_userid |
string | UserID of StickyNotes. |
currentStickyNote_date |
string | creation date of the StickyNotes. |
cvjs_setCustomCallbackMethodOnLoadEnd(callbackMethodOnLoadEnd, myOnLoadEndMethod)
Set custom call back method for OnLoadEnd when drawings are loaded.
Parameters:
Name | Type | Description |
---|---|---|
callbackMethodOnLoadEnd |
boolean | false: default - no custom method , true: custom method defined. |
myOnLoadEndMethod |
function | : method that is executed OnLoadEnd of drawing |
cvjs_setCustomMergedEmailHandler(handlerName)
Sets the name of server side handler to custom control merged content sent as email
Parameters:
Name | Type | Description |
---|---|---|
handlerName |
string | name of the controller/handler document |
cvjs_setCustomModalsContent(hbody, dual_hbody_flag, hbody2)
Sets Space Object modals to custom type
Parameters:
Name | Type | Description |
---|---|---|
hbody |
String | String containing the body of the popUpModal |
dual_hbody_flag |
boolean | false: flag for dual body popup |
hbody2 |
String | second hbody, when no active space object |
cvjs_setCustomPdfFolder(customPdfFolderName, forcedUpdate)
Sets the path to folder with converted PDF pages. If the folder exists and contain the converted pdf, the converted content will be used for visualization
Parameters:
Name | Type | Description |
---|---|---|
customPdfFolderName |
string | custom PDF path id, for permanent storage of converted PDF file |
forcedUpdate |
boolean | if true, force the folder to be reconverted (if the originating pdf has been updated), false is default |
cvjs_setCustomPDFprintController(handlerName)
Sets the name of server side controller to custom control print as PDF inside print modal
Parameters:
Name | Type | Description |
---|---|---|
handlerName |
string | name of the controller/handler document |
cvjs_setCustomPDFprintControllerFlag(customPrintAsPDF)
Sets flag to control if Print to PDF inside print modal shall be handled by custom controller. The name of controller is defined in: cvjs_setCustomPDFprintController()
Parameters:
Name | Type | Description |
---|---|---|
customPrintAsPDF |
boolean | default is false. Set to true to custom implement this feature |
cvjs_setCustomToolTip(customtooltip)
Set a custom tooltip overwriting the standard tooltip displaying either Name or Id
Parameters:
Name | Type | Description |
---|---|---|
customtooltip |
boolean | true for custom tooltip, false otherwise |
cvjs_setCustomToolTipValue(id, contentArr)
Set the content of a custom tooltip, based on the id of the object
Parameters:
Name | Type | Description |
---|---|---|
id |
string | id for tooltip |
contentArr |
arr | content for custom tooltip, array with lines of text |
cvjs_setCustomTopMenuXML(xml_config_file, floorplan_div)
Loads in the top icon menu system from an XML file
The XML file is in /cadviewer/app/js/menu_config/
The XML file allows custom settings of the number of menu pages, the start menu page
and content of each page, based on the selection set of available API commands
Parameters:
Name | Type | Description |
---|---|---|
xml_config_file |
String | XML top menu configuration file |
floorplan_div |
String | div in which CADViewer JS is implemented |
cvjs_setDefaultJSPath(path)
Set the script paths to load default drawings for encapsulate png rendering, typically ../javascripts
Parameters:
Name | Type | Description |
---|---|---|
path |
string | to default script-file folder |
cvjs_setDragBackgroundOnTop(floorplan_div)
Moves the drag background on top, typically for image and text intensive PDF files
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of on which CADViewer JS is located |
cvjs_setDragBackgroundToBack(floorplan_div)
Moves the drag background to its default position, at the back, typically for CAD files
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of on which CADViewer JS is located |
cvjs_setGenericColor()
Calls modal for setting redline color
cvjs_setGetFileController(handlerName)
Sets the name of server side controller to load drawings after conversion
Parameters:
Name | Type | Description |
---|---|---|
handlerName |
string | name of the controller/handler document |
cvjs_setIconInterfaceControls_ClassicSkin(mode, floorplan_div)
Set the classic icon desk, larger on desktop, smaller on devices
Parameters:
Name | Type | Description |
---|---|---|
mode |
boolean | Set the modal interface, default is true |
floorplan_div |
String | the div running CADViewer JS |
cvjs_setIconInterfaceControls_ClassicSkin_DevicesSizeOnly(mode, floorplan_div)
Set the classic icon desk, device size on all platforms
Parameters:
Name | Type | Description |
---|---|---|
mode |
boolean | Set the modal interface, default is true |
floorplan_div |
String | the div running CADViewer JS |
cvjs_setIconInterfaceControls_DisableIcons(mode, floorplan_div)
Removes the icon interface for viewing, redlining, etc. so that developers can control their own interface
Parameters:
Name | Type | Description |
---|---|---|
mode |
boolean | Set the modal interface, default is true |
floorplan_div |
String | the div running CADViewer JS |
cvjs_setIconInterfaceControls_ImageInsert()
Sets the icon interface for enabling image insert
cvjs_setIconInterfaceControls_MimimumDisk(mode, floorplan_div)
Set minimum icon desk, same size on all platforms
Parameters:
Name | Type | Description |
---|---|---|
mode |
boolean | Set the modal interface, default is true |
floorplan_div |
String | the div running CADViewer JS |
cvjs_setIconInterfaceControls_PageModal(mode, disableNavButtons, floorplan_div)
Disable/enable page change modal
Parameters:
Name | Type | Description |
---|---|---|
mode |
boolean | Set the modal interface, default is true, false disables page change modal |
disableNavButtons |
boolean | Disable page navigation icons in main menu disk. As a default when the page modal is disabled, extra navigation buttons are introduced in the icon interface. If always loading single page files, and no navigation is needed, set this to to true |
floorplan_div |
String | the div running CADViewer JS |
cvjs_setIconInterfaceControls_PanZoomDisk(mode, floorplan_div)
Set panzoom desk, same size on all platforms
Parameters:
Name | Type | Description |
---|---|---|
mode |
boolean | Set the modal interface, default is true |
floorplan_div |
String | the div running CADViewer JS |
cvjs_setIconInterfaceControls_SpaceManagement(floorplan_div)
Sets the icon interface for enabling space management
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer JS canvas |
cvjs_setIconInterfaceControls_ViewingOnly(floorplan_div)
Sets the icon interface for viewing, layerhanding, measurement, etc. only
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer JS canvas |
cvjs_setInformationModalType(modal)
Activates and displays the information modal with text
Parameters:
Name | Type | Description |
---|---|---|
modal |
int | type, 1 for bootstrap modal, 2 for standard floating modal, default is bootstrap modal |
cvjs_setInitMasterBackgroundMode(mode)
Sets the status of the drawing cvjs_masterbackground[cvjs_active_floorplan_div_nr]. If set to true, refreshed on reload, if false multiple drawings can be merged into canvas
Parameters:
Name | Type | Description |
---|---|---|
mode |
boolean | true for standard load, false for overlay of drawings on concequitive loads. |
cvjs_setInsertImageObjectsAbsolutePath(path, serverPath)
Sets the basolute path for the insert image object location, relative path is not used
Parameters:
Name | Type | Description |
---|---|---|
path |
string | absolute http/Url path to the inserted images location, |
serverPath |
string | absolute path to the inserted images location, "/home/cadviewerjs/drawings/mypath/inserted_image_objects/" |
cvjs_setInsertImageObjectsAbsolutePath_FileName(path, serverPath, fileName)
Sets the basolute path for the insert image object location, relative path is not used
Parameters:
Name | Type | Description |
---|---|---|
path |
string | absolute http/Url path to the inserted images location, |
serverPath |
string | absolute path to the inserted images location, "/home/cadviewerjs/drawings/mypath/inserted_image_objects/" |
fileName |
string | filename, "myobject.js" |
cvjs_setInsertImageObjectsRelativePath(path, serverPath)
Sets the relative path for the insert image object location
Parameters:
Name | Type | Description |
---|---|---|
path |
string | path to the inserted images location, default is "../drawings/inserted_image_objects/" |
serverPath |
string | absolute path to the inserted images location, "/home/cadviewerjs/drawings/mypath/inserted_image_objects/" |
cvjs_setJavaScriptsAbsoluteFolder(folder)
Set javascripts absolute folder url path. Used for print object to find scripts folder to access jquery and ajax
Parameters:
Name | Type | Description |
---|---|---|
folder |
string | absolute jQuery javascripts folder url path |
cvjs_setJavaScriptsJQ_AbsoluteFolder(folder)
Set javascripts absolute folder and jQuery url path. Used for print object to find scripts folder to access jquery and ajax
Parameters:
Name | Type | Description |
---|---|---|
folder |
string | absolute jQuery javascripts folder url path and name |
cvjs_setJSFileOldType(oldtype)
Sets the loading of filetypes to be the old CADViewer JS type, in which each file consists of four separate files
Parameters:
Name | Type | Description |
---|---|---|
oldtype |
boolean | true for oldtype, false for standard new type. Default is false. |
cvjs_setLicenseKeyDirect(licensekey)
Pass over the license key directly
The command will activate the license key
Parameters:
Name | Type | Description |
---|---|---|
licensekey |
String | string containing the license key JSON array |
cvjs_setLicenseKeyPath(licensePath)
Set the license key path, typically a path relative to the calling document, for example as ../javascripts
The command will activate the license key
Parameters:
Name | Type | Description |
---|---|---|
licensePath |
String | path to the license key location |
cvjs_setLoadMultipleRedlinesStickyNotes(mode:)
Sets the mode for loading multiple redlines and overlay the previous loaded
Parameters:
Name | Type | Description |
---|---|---|
mode: |
boolean | true to overlay redlines, false to clear redline when new is loaded, default is false |
cvjs_setMergeDXF(floorplan_div)
Calls modal for merge DXF document
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer JS canvas |
cvjs_setNoModalMode(cvjs_modalMode)
Sets the display mode of Space Object modals
Parameters:
Name | Type | Description |
---|---|---|
cvjs_modalMode |
boolean | false: standard modal on Space Object click as defined through setup method: InitCADViewerJS_ , true: modal is supressed, standard colors on highlight |
cvjs_setOriginatingFileUsernamePassword()
Sets the username and password on the server where the converter has to pick up the file for conversion set to "" "" if not protected
cvjs_setPanState(panState)
Enable or disable pan operations with a smaller thumbnail drawing object, thereby increasing redraw speed.
For large drawings and on limited capacity devices, set this option to true.
Parameters:
Name | Type | Description |
---|---|---|
panState |
boolean | true for pan with thumbnails, false for pan with original image |
cvjs_setPasswordProtectionServerAccess(passwordprotection)
Sets password protection for Server Access
Parameters:
Name | Type | Description |
---|---|---|
passwordprotection |
boolean | true for passwordprotection, false otherwise |
cvjs_setPhpPath(path)
Sets the location to the php folder
Parameters:
Name | Type | Description |
---|---|---|
path |
string | current location of php scripts, typically ../php/ |
cvjs_setPhpUploadPath(Url)
Sets the location to the php upload folder, this can be on a different domain
Parameters:
Name | Type | Description |
---|---|---|
Url |
string | location of upload_2.php document |
cvjs_setPrintModal_PrintPDF(printPDFflag)
Controls if Print to PDF feature is included in print Modal
Parameters:
Name | Type | Description |
---|---|---|
printPDFflag |
boolean | true is default, set to false to hide PrintAsPDF in Print Modal |
cvjs_setPrintModal_PrintToScale(printToScaleflag)
Controls if Print to Scale feature is included in print Modal
Parameters:
Name | Type | Description |
---|---|---|
printToScaleflag |
boolean | true is default, set to false to hide PrintToScale in Print Modal |
cvjs_setPrintObjectPath(path)
Sets the location to the print objects
Parameters:
Name | Type | Description |
---|---|---|
path |
string | location of print object relative to Controller, can also use absolute paths standard is "./temp_print/" |
cvjs_setPrintObjectPathAbsolute(pathUrl, absolutePathServer)
Sets the location to the print objects
Parameters:
Name | Type | Description |
---|---|---|
pathUrl |
string | location of print objects, web path |
absolutePathServer |
string | location of print objects, server side absolute path |
cvjs_setPrintOrientation(orientation)
Sets the print orientation
Parameters:
Name | Type | Description |
---|---|---|
orientation |
string | print orientation, portrait or landscape |
cvjs_setPrintPaperSize(papersize)
Sets the paper size of print output
Parameters:
Name | Type | Description |
---|---|---|
papersize |
string | String containg paper size, allowed settings are: A4, A3, A2, US LETTER, ANSI A, ANSI B, ANSI C |
cvjs_setPrintResolutionDpi(dpi)
Sets the print resolution
Parameters:
Name | Type | Description |
---|---|---|
dpi |
int | print resolution in dpi, minumum is 75dpi, standard is 300 |
cvjs_setPublishPDF(floorplan_div)
Calls modal for publish PDF document
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer JS canvas |
cvjs_setQRCodeInsertion(PercentXFromLowerLeft, PercentYFromLowerLeft, cvjs_widthPercent)
Sets the insertion location of QR Codes
Parameters:
Name | Type | Description |
---|---|---|
PercentXFromLowerLeft |
int | distance in x, percent of total width from lower left |
PercentYFromLowerLeft |
int | distance in y, percent of total height from lower left |
cvjs_widthPercent |
int | width of QR code, in percent of total width |
cvjs_setRedlineColor(floorplan_div)
Calls modal for setting redline color
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer JS canvas |
cvjs_setRedlinesAbsolutePath(path, serverPath)
Sets the absolute path for the redlines location, relative path is not used
Parameters:
Name | Type | Description |
---|---|---|
path |
string | abslute URL to the redlines location |
serverPath |
string | absolute path to the redlines location, "/home/cadviewerjs/redlines/" |
cvjs_setRedlinesRelativePath(serverPath, path)
Sets the relative path for the redlines location
Parameters:
Name | Type | Description |
---|---|---|
serverPath |
string | absolute path to the redlines location, "/home/cadviewerjs/redlines/" |
path |
string | path to the redlines location, default is "../redlines" |
cvjs_setRedlineThickness(floorplan_div)
Calls modal for setting redline color
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer JS canvas |
cvjs_setRelativeScriptsPath(scriptsPath)
Set the scripts path to folder with CADViewer JS javascripts
Parameters:
Name | Type | Description |
---|---|---|
scriptsPath |
string | paths to Scripts, typically "../javascripts" |
cvjs_setRestApiController(myConverterDoc)
Set the engine controller document handling conversions
Parameters:
Name | Type | Description |
---|---|---|
myConverterDoc |
string | name of the document handling conversions |
cvjs_setRestApiControllerLocation(myAXlocation)
Set the engine controller location for this library,
Parameters:
Name | Type | Description |
---|---|---|
myAXlocation |
string | location of the server side autoXchange structure |
cvjs_setReturnPDFparamsController(handlerName)
Sets the name of server side controller to return path structure for PDF conversion
Parameters:
Name | Type | Description |
---|---|---|
handlerName |
string | name of the controller/handler document |
cvjs_setServerAccessToPost(flag)
Sets ajax call for server access call for Post
jQuery.ajax({
type: 'POST',
url: serverUrl,
data: JSON.stringify(object),
Parameters:
Name | Type | Description |
---|---|---|
flag |
boolean | true for Post, false standard php case |
cvjs_setServerAccessToServlet(flag)
Sets ajax call for server access call for Servlets
jQuery.ajax({
url: "jsonservlet - cvjs_setRestApiControllerLocation + cvjs_setRestApiController",
type: 'POST',
dataType: 'json',
data: JSON.stringify(article),
contentType: 'application/json',
mimeType: 'application/json',
Parameters:
Name | Type | Description |
---|---|---|
flag |
boolean | true for servlets, false standard php case |
cvjs_setServerAppendFileHandler(handlerName)
Sets the name of server side append-file controller document
Parameters:
Name | Type | Description |
---|---|---|
handlerName |
string | name of the controller/handler document |
cvjs_setServerAppendFileHandlerPrint(handlerName)
Sets the name of server side append-file controller document for print
Parameters:
Name | Type | Description |
---|---|---|
handlerName |
string | name of the controller/handler document |
cvjs_setServerCopyFileHandler(handlerName)
Sets the name of server side copy-file controller document
Parameters:
Name | Type | Description |
---|---|---|
handlerName |
string | name of the controller/handler document |
cvjs_setServerDeleteFileHandler(handlerName)
Sets the name of server side delete-file controller document
Parameters:
Name | Type | Description |
---|---|---|
handlerName |
string | name of the controller/handler document |
cvjs_setServerDeleteFileHandlerPrint(handlerName)
Sets the name of server side delete-file controller document for print
Parameters:
Name | Type | Description |
---|---|---|
handlerName |
string | name of the controller/handler document |
cvjs_setServerFileLocation(myServerPathToFloorplans, floorplanPath, floorplanUrl, username, password)
Set up the location of folder in server in which files are upload to and accessed from
Parameters:
Name | Type | Description |
---|---|---|
myServerPathToFloorplans |
string | full path to the location of the drawings (typically /home/myserver/drawings/floorplans/) |
floorplanPath |
string | the relative location of floorplans relative to my document (typically ../drawings/floorplans/) |
floorplanUrl |
string | Url to the locations of floorplans relative to my document |
username |
string | username for floorplans drawings folder, "" if none |
password |
string | password for floorplans drawings folder, "" if none |
cvjs_setServerFileLocation_AbsolutePaths(myServerPathToFloorplans, floorplanPath, username, password)
Set up the location of folder in server in which files are upload to and accessed from
Parameters:
Name | Type | Description |
---|---|---|
myServerPathToFloorplans |
string | full path to the location of the drawings (typically /home/myserver/drawings/floorplans/) |
floorplanPath |
string | the relative location of floorplans relative to my document (typically ../drawings/floorplans/) |
username |
string | username for floorplans drawings folder, "" if none |
password |
string | password for floorplans drawings folder, "" if none |
cvjs_setServerGetQRCodeController(serverGetQRCodeController)
Sets the insertion location of QR Codes
Parameters:
Name | Type | Description |
---|---|---|
serverGetQRCodeController |
String | controller name |
cvjs_setServerHandlersPath(path)
Sets the location of the server side handers for load, save, append and print controls
Parameters:
Name | Type | Description |
---|---|---|
path |
string | location of print handlers, in the standard case this in the "/php/" folder with redline and file controllers |
cvjs_setServerListDirectoryHandler(handlerName)
Sets the name of server side directory list controller document
Parameters:
Name | Type | Description |
---|---|---|
handlerName |
string | name of the controller/handler document |
cvjs_setServerLoadHandler(handlerName)
Sets the name of server side load-file controller document for file list load
Parameters:
Name | Type | Description |
---|---|---|
handlerName |
string | name of the controller/handler document |
cvjs_setServerLoadHandlerRedlines(handlerName)
Sets the name of server side load-file controller document for redline load
Parameters:
Name | Type | Description |
---|---|---|
handlerName |
string | name of the controller/handler document |
cvjs_setServerLocationURL(ServerLocation, ServerURL)
Passes over the current settings of the calling html document context
Parameters:
Name | Type | Description |
---|---|---|
ServerLocation |
string | server location of html on which CADViewer JS is located |
ServerURL |
string | server url of html on which CADViewer JS is located |
cvjs_setServerMergeDWGHandler(handlerName)
Sets the name of server side merge DWG controller document
Parameters:
Name | Type | Description |
---|---|---|
handlerName |
string | name of the controller/handler document |
cvjs_setServerPDFConverterController(handlerName)
Sets the name of server side controller to control PDF conversion
Parameters:
Name | Type | Description |
---|---|---|
handlerName |
string | name of the controller/handler document |
cvjs_setServerRedlinesListDirectoryHandler(handlerName)
Sets the name of server side directory redlines list controller document
Parameters:
Name | Type | Description |
---|---|---|
handlerName |
string | name of the controller/handler document |
cvjs_setServerSaveFileHandler(handlerName)
Sets the name of server side save-file controller document
Parameters:
Name | Type | Description |
---|---|---|
handlerName |
string | name of the controller/handler document |
cvjs_setServerSaveFileHandlerPrint(handlerName)
Sets the name of server side save-file controller document for print
Parameters:
Name | Type | Description |
---|---|---|
handlerName |
string | name of the controller/handler document |
cvjs_setServerSaveHandlerRedlines(handlerName)
Sets the name of server side save-file controller document for redline save
Parameters:
Name | Type | Description |
---|---|---|
handlerName |
string | name of the controller/handler document |
cvjs_setServerSavePrintModeController(mode)
Sets the server print mode controller. This variable is used to control what happens after a screenshot is sent to the server
Parameters:
Name | Type | Description |
---|---|---|
mode |
int | the mode in which to control encapsulations of screenshots images sent down to server mode = 0: Standard print mode in which a screenshot gets encapsulated into an html document that is opened through a pop-up for printing mode = 1: The screenshot is saved to the server as part of stickyNote save, and thumbnails of the image is generated, see method: cvjs_saveScreenAsImage_stickyNoteInfo_makeTumbnails() mode = 2: The screenshot is saved to the server as part of a multidocument batch print pdf creation, see method: cvjs_batchConvertDrawingsToPDF() |
cvjs_setServerSavePrintModeHandler(mode)
Sets the server print mode controller. This variable is used to control what happens after a screenshot is sent to the server
Parameters:
Name | Type | Description |
---|---|---|
mode |
int | the mode in which to control encapsulations of screenshots images sent down to server mode = 0: Standard print mode in which a screenshot gets encapsulated into an html document that is opened through a pop-up for printing mode = 1: The screenshot is saved to the server as part of stickyNote save, and thumbnails of the image is generated, see method: cvjs_saveScreenAsImage_stickyNoteInfo_makeTumbnails() mode = 2: The screenshot is saved to the server as part of a multidocument batch print pdf creation, see method: cvjs_batchConvertDrawingsToPDF() |
cvjs_setServerScreenToPDFController(controller)
Sets the server ScreenToPDF PHP controller document
Parameters:
Name | Type | Description |
---|---|---|
controller |
String | The location of this document is in: cvjs_phpPath + "/tcpdf/batchconvert/" if php, else it will use handler folder. |
cvjs_setServerScreenToPDFHandler(controller)
Sets the server ScreenToPDF PHP controller document
Parameters:
Name | Type | Description |
---|---|---|
controller |
String | The location of this document is in: cvjs_phpPath + "/tcpdf/batchconvert/" if php, else it will use handler folder. |
cvjs_setSpaceObjectsAbsolutePath(path, serverPath)
Sets the absolute path for the space object location, relative path is not used
Parameters:
Name | Type | Description |
---|---|---|
path |
string | abslute URL to the space object location |
serverPath |
string | absolute path to the space object location, "/home/cadviewerjs/spaceObjects/" |
cvjs_setSpaceObjectUrl(file)
Sets the name and url of the Space Object file to load, The Space Object file is has the extension .js
Parameters:
Name | Type | Description |
---|---|---|
file |
string | String containg url and name of space_object.js file |
cvjs_setSpacePolygonOnLayer(floorplan_div)
On the Room Layer designated by the Space Management list, it searches for the encapsulating polygon at the location of mouse-click. If polygon is found
a room object is created.
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer JS canvas |
cvjs_setStickyNoteRedlineUrl(file)
Sets the name and url of the redline file to load, The redline file is has the extension .js
Parameters:
Name | Type | Description |
---|---|---|
file |
string | String containg url and name of redline.js file |
cvjs_setStickyNoteSaveRedlineUrl(file)
Sets the name and url of the redline file to save. The redline file can be .js , .dxf or .xml
Parameters:
Name | Type | Description |
---|---|---|
file |
string | String containg url and name of redline.js/redline.ext file |
cvjs_setSupressHyperlinkColors(supressflag)
Sets the the response of
Parameters:
Name | Type | Description |
---|---|---|
supressflag |
boolean | true to supress hyperlink colors, false to keep standard highlight |
cvjs_setSVG_outputFormatInAXConversions(mode)
Set SVG conversion control parameter for server based conversion using either SVG or JS as format.
Parameters:
Name | Type | Description |
---|---|---|
mode |
boolean | true for SVG as intermediate format false for .js as intermediate format. Default is true. |
cvjs_setUrl_singleDoubleClick(click)
Sets the click response of URl links to either single click or double click
Parameters:
Name | Type | Description |
---|---|---|
click |
int | 1: single click 2: double click |
cvjs_showMeCounts(floorplan_div)
Show number of quick counts
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer JS canvas |
cvjs_showToolTipLocation(tiptext, x, y)
Show the standard tooltip in a given location
Parameters:
Name | Type | Description |
---|---|---|
tiptext |
string | text of the tooltip to be displayed |
x |
int | x coordinate location of the tooltip object to be displayed |
y |
int | y coordinate location of the tooltip object to be displayed |
cvjs_sortLayers_insertAfter(layer1, layer2) → {boolean}
Sort two layers in order, insert layer2 after layer1
Parameters:
Name | Type | Description |
---|---|---|
layer1 |
string | name of layer one |
layer2 |
string | name of layer two |
Returns:
- true if sorted, false otherwise
- Type
- boolean
cvjs_sortLayers_prepend(layer1, layer2) → {boolean}
Sort two layers in order, prepend layer2
Parameters:
Name | Type | Description |
---|---|---|
layer1 |
string | name of layer one |
layer2 |
string | name of layer two |
Returns:
- true if sorted, false otherwise
- Type
- boolean
cvjs_sortLayersInOrder(layer1, layer2) → {boolean}
Sort two layers in order
Parameters:
Name | Type | Description |
---|---|---|
layer1 |
string | name of layer one |
layer2 |
string | name of layer two |
Returns:
- true if sorted, false otherwise
- Type
- boolean
cvjs_spaceObjectSettings(floorplan_div)
Settings of how Space Objects communicates with user defined back-end
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer JS canvas |
cvjs_start_collab(floorplan_div)
Start a collaboration session
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer JS canvas |
cvjs_startSearchText()
Calls the interactive modal for text search
cvjs_StickyNoteClicked() → {string}
Identify the node identifier of the last Sticky Note selected - Object Spaces, Sticky Notes and Redlines are differentiated.
Returns:
nodeId - The nodeId is (-1) in case of no current object selected
- Type
- string
cvjs_stop_collab(floorplan_div)
Leave the collaboration session
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
string | name of div containing CADViewer JS canvas |
cvjs_storeFillColors()
Create an internal array with all fill colors on all SVG graphical objects.
cvjs_supressPopUpModalMode(modal_mode)
Controls the appearance of pop up modal when space object is clicked
Parameters:
Name | Type | Description |
---|---|---|
modal_mode |
boolean | flag to make popup modal disappear , false is default and display, true for supressed |
cvjs_swapLayersInDrawing(floorplan_div)
Swap drawing layers On/Off
Parameters:
Name | Type | Description |
---|---|---|
floorplan_div |
String | div of the CADViewerJS canvas |
cvjs_updateDrawingRedlines()
Update redlines after page change
cvjs_version() → {string}
Display the current version number of the CADViewer JS toolkit and viewer
Returns:
version - current version number
- Type
- string
cvjs_windowResize_fixedSize(doResize, widthFloorplan, heightFloorplan, floorplan)
Resize CADViewer JS canvas after browser window changes, automatic adjustment based on canvas size and location
Parameters:
Name | Type | Description |
---|---|---|
doResize |
boolean | flag to do resize of canvas or not: Parameter doResize is set to false when calling cvjs_windowResize_ after initialization and loading of file. Parameter doResize is set to true when cvjs_windowResize is implemented into the function jQuery(window).resize(function() {} |
widthFloorplan |
float | width of containing element in pixels |
heightFloorplan |
float | height of containing element in pixels |
floorplan |
string | name of SVG element containing canvas |
cvjs_windowResize_position(doResize, floorplan)
Resize CADViewer JS canvas after browser window changes, automatic adjustment based on canvas size and location
Parameters:
Name | Type | Description |
---|---|---|
doResize |
boolean | flag to do resize of canvas or not: Parameter doResize is set to false when calling cvjs_windowResize_ after initialization and loading of file. Parameter doResize is set to true when cvjs_windowResize is implemented into the function jQuery(window).resize(function() {} |
floorplan |
string | name of SVG element containing canvas |
cvjs_zoomExtents()
Zoom Extents on the drawing
cvjs_zoomHere_Factor(node, factor)
Zoom in over the extents of an object using a zoom factor
Parameters:
Name | Type | Description |
---|---|---|
node |
String | NODE_ node object |
factor |
float | zoom factor to zoom in over |
cvjs_zoomHere_ObjectId(rmid, factor)
Zoom in over the extents of an object using a zoom factor
Parameters:
Name | Type | Description |
---|---|---|
rmid |
String | Id of the Space Object to zoom over |
factor |
float | zoom factor to zoom in over in percent |
cvjs_zoomHere_ObjectIdDiv(rmid, factor, floorplan_div)
Zoom in over the extents of an object using a zoom factor
Parameters:
Name | Type | Description |
---|---|---|
rmid |
String | Id of the Space Object to zoom over |
factor |
float | zoom factor to zoom in over in percent |
floorplan_div |
String | floorplan div to zoom over |