Name

sn_diagram_builder.DiagramBuilderShapePropertyService

Description

No description available

Script

var DiagramBuilderShapePropertyService = Class.create();
DiagramBuilderShapePropertyService.prototype = {
  initialize: function() {},

  type: 'DiagramBuilderShapePropertyService'
};

DiagramBuilderShapePropertyService._constructShapePropertyObject = function(shapePropertiesGr) {
  return {
      bindingFunction: shapePropertiesGr.getValue(DiagramBuilderShapeProperty.BINDING_FUNCTION),
  	isAdvanced: shapePropertiesGr.getValue(DiagramBuilderShapeProperty.IS_ADVANCED) === "1",
  	customValue: shapePropertiesGr.getValue(DiagramBuilderShapeProperty.CUSTOM_VALUE),
  	isCustom: shapePropertiesGr.getValue(DiagramBuilderShapeProperty.VALUE_TYPE) === DiagramBuilderShapeProperty.VALUE_TYPE_FUNCTION,
  	isDynamic: shapePropertiesGr.getValue(DiagramBuilderShapeProperty.VALUE_TYPE) === DiagramBuilderShapeProperty.VALUE_TYPE_DYNAMIC,
      constantValue: shapePropertiesGr.getValue(DiagramBuilderShapeProperty.CONSTANT_VALUE),
      shapeTemplate: shapePropertiesGr.getValue(DiagramBuilderShapeProperty.SHAPE_TEMPLATE),
      sourceProperty: shapePropertiesGr.getValue(DiagramBuilderShapeProperty.SOURCE_PROPERTY),
      targetProperty: shapePropertiesGr.getValue(DiagramBuilderShapeProperty.TARGET_PROPERTY),
      sysId: shapePropertiesGr.getUniqueValue()
  };
};

DiagramBuilderShapePropertyService.getPropertiesByShapeTemplateId = function(shapeTemplateId) {
  var shapePropertiesGr = DiagramBuilderShapeProperty.getPropertiesByShapeTemplateId(shapeTemplateId);
  var shapeProperties = [];
  while (shapePropertiesGr.next()) {
      shapeProperties.push(DiagramBuilderShapePropertyService._constructShapePropertyObject(shapePropertiesGr));
  }
  return shapeProperties;
};

DiagramBuilderShapePropertyService.getPropertyById = function(shapePropertyId) {
  var shapePropertyGr = DiagramBuilderShapeProperty.getPropertyById(shapePropertyId);
  return DiagramBuilderShapePropertyService._constructShapePropertyObject(shapePropertyGr);
};

Sys ID

4413c2f80f131010e035549796767eaa

Offical Documentation

Official Docs: