Skip to content
This repository has been archived by the owner on Nov 22, 2019. It is now read-only.

Commit

Permalink
Merge pull request #81 from mdrillin/upgrade_to_angular5
Browse files Browse the repository at this point in the history
corrects canvas-node functions
  • Loading branch information
mdrillin committed Nov 6, 2018
2 parents 1115a90 + 1c55b9c commit 591b47e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ export class CanvasNode implements cola.Node {
private _root = false;

public static encodeId(id: string): string {
// TODO: fix this
return "";
// return id.replace(/\//g, '5X5').replace(/=/g, '6X6');
const regex1 = /\//g;
const regex2 = /=/g;
return id.replace(regex1, '5X5').replace(regex2, '6X6');
}

public static decodeId(id: string): string {
// TODO: fix this
return "";
// return id.replace(/5X5/g, '/').replace(/6X6/g, '=');
const regex1 = /5X5/g;
const regex2 = /6X6/g;
return id.replace(regex1, '/').replace(regex2, '=');
}

constructor(id: string, payload: string, type: string, label: string, root?: boolean) {
Expand Down
28 changes: 0 additions & 28 deletions ui/src/app/shared/property-form/property-control-type.enum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,31 +44,3 @@ export enum PropertyControlType {
TEXT

}

/**
* Namespace to allow methods on the enum.
*/
// export namespace PropertyControlType {
//
// /**
// * @param propDefn the property whose control type is being requested
// * @returns the control type to render the property value
// */
// export function toControlType( propDefn: PropertyDefinition< any > ): PropertyControlType {
// if ( propDefn.isConstrainedToAllowedValues() ) {
// return PropertyControlType.DROPDOWN;
// }
//
// if ( propDefn.getTypeClassName() === "java.lang.Boolean" ) {
// return PropertyControlType.CHECKBOX;
// }
//
// if ( propDefn.isMasked() || propDefn.getId() === "password" ) {
// return PropertyControlType.PASSWORD;
// }
//
// // defaults to a text control
// return PropertyControlType.TEXT;
// }
//
// }

0 comments on commit 591b47e

Please sign in to comment.