diff --git a/.env b/.env index d5c1e90..4c8d217 100644 --- a/.env +++ b/.env @@ -1,14 +1,6 @@ VUE_APP_API_HOST=http://a3957b136544e11e9a56802910c21b39-1662590085.ap-northeast-2.elb.amazonaws.com:8080 VUE_APP_TRANSLATE_KEY=AIzaSyB2_MiQOuI2clNuy0QP3yktUXxbfiVAaUk VUE_APP_FILE_PATH=../public/static/templates/ -VUE_APP_FIREBASE_APIKEY=AIzaSyBamzK_XrEiPw2cDJC60jvGvD1mFH51BYw -VUE_APP_FIREBASE_authDomain=eventstorming-tool-db.firebaseapp.com -VUE_APP_FIREBASE_databaseURL=https://eventstorming-tool-db.firebaseio.com -VUE_APP_FIREBASE_projectId=eventstorming-tool-db -VUE_APP_FIREBASE_storageBucket=gs://eventstorming-tool-db.appspot.com -VUE_APP_FIREBASE_messagingSenderId=779007656524 -VUE_APP_FIREBASE_appId=1:779007656524:web:dca1266cda32bf61c3aae9 -VUE_APP_FIREBASE_measurementId=G-1SBM63TNC #VUE_APP_API_HOST=http://ac919429a22b611e9884d02be6ea23ef-400105267.ap-northeast-2.elb.amazonaws.com #PUSHER_APP_ID=791580 #PUSHER_KEY=33169ca8c59c1f7f97cd diff --git a/package.json b/package.json index 5891c22..d1f3548 100644 --- a/package.json +++ b/package.json @@ -10,9 +10,10 @@ "main": "./dist/kuber-ez.common.js", "dependencies": { "@hscmap/vue-window": "^2.4.2", - "@mdi/font": "^5.0.45", "@mdi/js": "^4.9.95", "@mdi/react": "^1.4.0", + "@octokit/rest": "^18.9.0", + "acebase": "^1.29.5", "axios": "^0.27.2", "body-parser": "^1.19.0", "change-case": "^3.1.0", @@ -22,7 +23,6 @@ "es6-error": "^4.1.1", "express": "^4.17.1", "file-saver": "^2.0.2", - "firebase": "^7.24.0", "fs": "0.0.1-security", "gh-pages": "^2.2.0", "js-base64": "^2.6.4", @@ -63,9 +63,12 @@ "vuedraggable": "^2.24.3", "vuejs-jwt": "^1.1.0", "vuetify": "^2.3.10", - "vuex": "^3.5.1" + "vuex": "^3.5.1", + "yamljs": "^0.3.0" }, "devDependencies": { + "@iconify/vue2": "^2.1.0", + "@mdi/font": "^7.3.67", "@vue/cli-plugin-pwa": "^3.12.1", "@vue/cli-service": "^3.12.1", "cssimportant-loader": "^0.4.0", diff --git a/public/global-style.css b/public/global-style.css new file mode 100644 index 0000000..44c43d8 --- /dev/null +++ b/public/global-style.css @@ -0,0 +1,774 @@ +/* *{ + font-family: 'Apple SD Gothic Neo','Malgun Gothic',arial,sans-serif !important; +} */ + +.gs-rule-example-chip { + margin-right:5px; + background:#BDBDBD !important; +} + +.gs-content-detail { + font-size: 10px; +} + +.gs-model-z-index-1 { + z-index:1 !important; +} + +.gs-model-z-index-2 { + z-index:2 !important; +} + +.gs-modeling-undo-redo { + position:absolute; + margin:12px 0 0 160px; + min-width:170px !important; + max-width:170px !important; +} + +.gs-info-bg { + position: absolute; + top: 40%; + left: 50%; + margin-left: -101px; + transfrom: translate(-50%, -50%); + color: #1E88E5; +} + +.gs-model-panel-sticker { + width:33px; + height:33px; + min-width:0; + margin:0; +} + +.gs-model-panel-Author { + font-size: small; + width: 100%; + margin-top:-5%; + margin-left:15px; + text-align: -webkit-right; + color: gray; +} + +.gs-model-panel-editing-user { + background-color: gray; + font-size:small; + font-weight:bold; + height:26px; + color:white; +} + +.gs-info-title { + font-size: 25px; +} + +.gs-info-sub-bg { + background-color: #BDBDBD; + color: white; + border-radius: 20px; + width: 255px; + margin-top: 20px; + padding: 5px; +} + +.gs-info-sub-title { + font-size: 14px; +} + +.gs-info-description { + text-align: left; + font-size: 12px; + margin-left: 20px; + margin-top: 10px; +} + +.gs-aggre-gate-panel { + width:124.7%; + margin-left:-12%; +} +.gs-command-panel{ + margin-left:-10px; margin-top:-15px; min-width:105%; +} +iframe { + height: 100%; + width: 100%; +} + +.nb-notebook { + line-height: 1.5; +} + +.nb-stdout, .nb-stderr { + white-space: pre-wrap; + margin: 1em 0; + padding: 0.1em 0.5em; +} + +.nb-stderr { + background-color: #FAA; +} + +.nb-cell + .nb-cell { + margin-top: 0.5em; +} + +.nb-output table { + border: 1px solid #000; + border-collapse: collapse; +} + +.nb-output th { + font-weight: bold; +} + +.nb-output th, .nb-output td { + border: 1px solid #000; + padding: 0.25em; + text-align: left; + vertical-align: middle; + border-collapse: collapse; +} + +.nb-cell { + position: relative; +} + +.nb-raw-cell { + white-space: pre-wrap; + background-color: #f5f2f0; + font-family: Consolas, Monaco, 'Andale Mono', monospace; + padding: 1em; + margin: .5em 0; +} + +.nb-output { + min-height: 1em; + width: 100%; + border-right: 1px dotted #CCC; +} + +.nb-output img { + max-width: 100%; +} + +.nb-output:before, .nb-input:before { + position: absolute; + font-family: monospace; + color: #999; + left: -7.5em; + width: 7em; + text-align: right; +} + +.nb-input:before { + content: "In [" attr(data-prompt-number) "]:"; +} + +.nb-output:before { + content: "Out [" attr(data-prompt-number) "]:"; +} + +/* / +/ +Fix pandas dataframe formatting */ +div[style="max-height:1000px;max-width:1500px;overflow:auto;"] { + max-height: none !important; +} +/*code block css*/ +code[class*="language-"], +pre[class*="language-"] { + color: black; + background: none; + font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; + font-size: 1em; + text-align: left; + white-space: pre; + word-spacing: normal; + word-break: normal; + word-wrap: normal; + line-height: 1.5; + + -moz-tab-size: 4; + -o-tab-size: 4; + tab-size: 4; + + -webkit-hyphens: none; + -moz-hyphens: none; + -ms-hyphens: none; + hyphens: none; +} + +/* Code blocks */ +pre[class*="language-"] { + padding: 1em; + margin: .5em 0; + overflow: auto; + border-radius: 0.3em; +} + +:not(pre) > code[class*="language-"], +pre[class*="language-"] { + background: #f6f8fa; +} + +.theme--light.v-application code { + background-color: none !important; + background: none !important; +} + +/* Inline code */ +:not(pre) > code[class*="language-"] { + padding: .1em; + border-radius: .3em; + white-space: pre; +} + +.token.comment, +.token.prolog, +.token.doctype, +.token.cdata { + color: #8292a2; +} + +.token.punctuation { + color: black; +} + +.token.namespace { + opacity: .7; +} + +.token.property, +.token.tag, +.token.constant, +.token.symbol, +.token.deleted { + color: #f92672; +} + +.token.boolean, +.token.number { + color: #ae81ff; +} + +.token.selector, +.token.attr-name, +.token.string, +.token.char, +.token.builtin, +.token.inserted { + color: #3d560a; +} + +.token.operator, +.token.entity, +.token.url, +.language-css .token.string, +.style .token.string, +.token.variable { + color: black; +} + +.token.atrule, +.token.attr-value, +.token.function, +.token.class-name { + color: orange; +} + +.token.keyword { + color: blue; +} + +.token.regex, +.token.important { + color: #fd971f; +} + +.token.important, +.token.bold { + font-weight: bold; +} +.token.italic { + font-style: italic; +} + +.token.entity { + cursor: help; +} +/*instruction codeblock*/ +.markdown-body pre[class*="language-"] { + position: relative; + border-radius: 5px; +} + +.markdown-body pre[class*="language-"] .copy { + content: "copy"; + padding-bottom:5px; + width:30px; + position: absolute; + top: 0; + right: -20px; + border:none; + transform: translate(-10px, -90%); + background: none; + cursor: pointer; + transition: all 200ms ease; + display:none; + filter: invert(100%); +} + +code[class*=language-]:nth-child(1) { + margin-left:-2px; +} + +.markdown-body pre[class*="language-"]:hover .copy { + display:block; +} + +.markdown-body pre[class*="language-"]:hover .copy:hover { + color: gray; +} + + /*code block css*/ + + +.code-preview-left-re-size { + min-width:100px; +} + +.code-preview-left-re-size-btn { + width: 30px !important; + height: 30px !important; + font-size: 30px !important; + +} + +/* 트리뷰 관련 */ +.v-treeview--dense .v-treeview-node__root { + min-height:26px !important; +} + +.event-storming-treeview-height .v-treeview--dense .v-treeview-node__root { + min-height:30px !important; +} + +.gs-v-treeview-width .v-treeview-node .v-treeview-node__root { + width:500px !important; +} + +.v-treeview-node__children { + margin-left:-10px; +} + +.v-application--is-ltr .v-treeview-node__prepend { + margin-right:0px; + margin-left:-5px; +} + +.gs-source-tree-v-list-group .v-list-group__items { + max-height: 400px; + overflow-y: scroll; + padding-top: 10px; +} + +.gs-edited-template-files-v-list-group > .v-list-group__items { + overflow-y: scroll; +} +/* -------------------------------------------------------- */ + + +.gs-code-viewer-in-bound-separate-panel .in-bound-pane-trigger { + margin-top:0px !important; +} +.gs-code-viewer-in-bound-separate-panel { + margin-top:2px !important; +} + /*monaco-editor*/ +.minimap, .slider-mouseover { + position: absolute !important; + right:0 !important; + left: auto !important; + display:none; +} + +.ui-tabs-anchor { + background-color:red; +} + + +.monaco-scrollable-element .editor-scrollable { + width:100% !important; +} + +.monaco-scrollable-element .editor-scrollable .vs-dark .mac { + width:100% !important; +} + +.monaco-editor .monaco-scrollable-element, .monaco-editor .editor-scrollable{ + width: 100% !important; +} + +.monaco-editor .inputarea.ime-input { + width:100% !important; +} + +.monaco-editor .overflow-guard { + width:100% !important; +} + +.rename-box { + display:none; +} +.monaco-editor { + width: 100% !important; + min-height: 100% !important; +} + +.monaco-editor .diffOverview { + position: absolute; + top: 0px; + height: 800px; + width: 30px; + left: 100% !important; +} + +.monaco-editor .original{ + position: absolute; + height: 100%; + width: 50% !important; + left: 0px !important; + +} + +.monaco-editor .modified{ + position: absolute; + height: 100%; + width: 50% !important; + left: 50% !important; +} + + +.monaco-editor .myContentClass { + background: #BBDEFB; +} + + +.v--modal-overlay.scrollable .v--modal-box { + width:80% !important; +} + + +.hide-scroll > div { + overflow: hidden; +} + +.gs-automatic-guidance-btn:hover { + cursor: pointer; +} + +.gs-automatic-guidance-icon { + margin:-5px 0 5px 0; +} + +.gs-automatic-guidance-icon:hover { + color:#1E88E5 !important; +} + +.gs-embedded-model { + margin-left: 400px !important; +} + +.gs-main-search .v-input__slot { + min-height: 25px !important; + width: 100% !important; + margin-top: 10px; +} + +.gs-main-search .v-label { + top: 8px !important; +} + +.CodeMirror .cm-spell-error:not(.cm-url):not(.cm-comment):not(.cm-tag):not(.cm-word) { + background: none !important; +} + + +.gs-main-page-top-title { + font-size:38px; + font-weight: 500; + margin-top:100px; +} + +.gs-main-page-sub-title { + font-size:16px; +} + +.gs-main-page-top-image { + float: left; + width:380px; +} + +.gs-main-page-top-box { + margin:40px 0px 100px 0px; + padding-left: 15%; +} + +.gs-code-title { + font-size: 15px; + color: gray; +} + +.gs-main-page-title-box { + float:left; + width:750px; +} + +.gs-main-page-top-box-mobile { + display: none; +} + +.gs-main-page-top-image-mobile { + width:300px; +} + +.gs-main-page-top-title-mobile { + margin-top:20px; + font-size:20px; + font-weight: 500; +} + +.gs-main-page-sub-title-mobile { + font-size:10px; +} + +.gs-window-width-610-under-zoom { + position: relative !important; + left: 170px !important; + opacity: 0.3; +} +.gs-window-width-610-under-zoom:hover { + opacity: 1; +} + +.gs-undo-opacity-hover { + opacity: 0.3; +} +.gs-redo-opacity-hover { + opacity: 0.3; +} +.gs-undo-opacity-hover:hover { + opacity: 1; +} +.gs-redo-opacity-hover:hover { + opacity: 1; +} + +@media only screen and (max-width:1409px) and (min-width:1298px){ + .gs-main-page-top-title { + margin-top:50px; + font-size:34px; + font-weight: 500; + } + + .gs-main-page-sub-title { + font-size:15px; + } + .gs-main-page-top-image { + float: left; + width:360px; + } + + .gs-main-page-title-box { + width:650px; + } +} + +@media only screen and (max-width:1297px) and (min-width:1186px) { + .gs-main-page-top-title { + margin-top:50px; + font-size:30px; + font-weight: 500; + } + + .gs-main-page-sub-title { + font-size:14px; + } + + .gs-main-page-top-image { + float: left; + width:340px; + } + .gs-main-page-title-box { + width:550px; + } +} + +@media only screen and (max-width:1185px) and (min-width:1074px) { + .gs-main-page-top-title { + margin-top:70px; + font-size:26px; + font-weight: 500; + } + + .gs-main-page-sub-title { + font-size:13px; + } + + .gs-main-page-top-image { + width:320px; + } + + .gs-main-page-title-box { + width:480px; + } +} + +@media only screen and (max-width:1073px) and (min-width:962px) { + .gs-main-page-top-title { + margin-top:60px; + font-size:22px; + font-weight: 500; + } + + .gs-main-page-sub-title { + font-size:12px; + } + + .gs-main-page-top-image { + width:300px; + } + + .gs-main-page-title-box { + width:450px; + } +} + +@media only screen and (max-width:972px) { + .theme--dark.v-overlay { + display:none; + } +} + + +@media only screen and (max-width:961px) and (min-width:898px) { + .gs-main-page-top-title { + margin-top: 50px; + font-size: 18px; + font-weight: 500; + } + + .gs-main-page-sub-title { + font-size:10px; + } + + .gs-main-page-top-image { + width:280px; + } + + .gs-main-page-title-box { + width:420px; + } +} + +@media only screen and (max-width:897px){ + .gs-main-page-top-box-mobile { + display: block; + } + + .gs-main-page-top-box { + display: none; + } +} + +@media only screen and (max-width:600px){ + .gs-window-width-610-under-zoom { + position:fixed !important; + left: 155px !important; + top: 15px !important; + margin-left:0px !important; + min-width:170px !important; + max-width:170px !important; + } + .gs-modeling-undo-redo { + position: absolute !important; + left: 195px !important; + top: 10px !important; + margin:10px 0px 0px 0px !important; + } + + +} + +.gs-auto-modeling-text-box .v-text-field__details{ + display:none; +} + +.auto-modeling-dialog-textarea .v-input__control .v-text-field__details { + display:none; +} +.auto-modeling-dialog-textarea .v-input__control .v-input__slot .v-text-field__slot textarea{ + height:75vh; +} +.auto-modeling-dialog .v-expansion-panel-content__wrap { + padding:0px 0px 0px 10px; +} + +.auto-modling-textarea { + max-height: 1385px !important; + overflow-y: auto !important; +} + +.auto-modeling-btn { + margin-right: 10px !important; +} + +.auto-modeling-btn-box { + float: right !important; + margin-top: -40px !important; +} + +.auto-modeling-stop-loading-icon { + height:24px !important; + width:24px !important; + margin-right:5px !important; +} + +.auto-modeling-message { + font-size: 16px !important; + color: #282828 !important; + font-weight: 400 !important; + padding: 10px !important; +} + +.auto-modeling-message-card { + background-color: #DAF5FF !important; + display: inline-block !important; +} + +.auto-modeling-message-box { + padding: 0px 0px 10px 0px !important; +} + +.auto-modeling-message-border { + margin-left: 10px !important; + margin-right: 10px !important; +} + +.auto-modeling-btn-icon { + margin-right: 5px !important; +} + +.auto-modeling-user-story-card { + white-space: pre !important; + margin: 10px !important; + margin-bottom: -10px !important; + float: right !important; + width: 90% !important; +} + +.scrollable { + overflow-y: scroll; +} + diff --git a/public/index.html b/public/index.html index 11c7a62..3e7d3b6 100644 --- a/public/index.html +++ b/public/index.html @@ -11,7 +11,7 @@ -
Encodes a Date. This returns the actual string which is inserted into the JSON string as the literal expression. - * The returned value includes enclosing double quotation marks.
- *The default return format is "yyyy-mm-ddThh:mm:ss".
- *To override this:
- OG.common.JSON.encodeDate = function(d) {
+ var useHasOwn = !!{}.hasOwnProperty,
+ USE_NATIVE_JSON = false,
+ isNative = (function () {
+ var useNative = null;
+
+ return function () {
+ if (useNative === null) {
+ useNative = USE_NATIVE_JSON && window.JSON && JSON.toString() === '[object JSON]';
+ }
+
+ return useNative;
+ };
+ }()),
+ m = {
+ "\b": '\\b',
+ "\t": '\\t',
+ "\n": '\\n',
+ "\f": '\\f',
+ "\r": '\\r',
+ '"': '\\"',
+ "\\": '\\\\'
+ },
+ pad = function (n) {
+ return n < 10 ? "0" + n : n;
+ },
+ doDecode = function (json) {
+ return eval("(" + json + ')');
+ },
+ encodeString = function (s) {
+ if (/["\\\x00-\x1f]/.test(s)) {
+ return '"' + s.replace(/([\x00-\x1f\\"])/g, function (a, b) {
+ var c = m[b];
+ if (c) {
+ return c;
+ }
+ c = b.charCodeAt();
+ return "\\u00" +
+ Math.floor(c / 16).toString(16) +
+ (c % 16).toString(16);
+ }) + '"';
+ }
+ return '"' + s + '"';
+ },
+ encodeArray = function (o) {
+ var a = ["["], b, i, l = o.length, v;
+ for (i = 0; i < l; i += 1) {
+ v = o[i];
+ switch (typeof v) {
+ case "undefined":
+ case "function":
+ case "unknown":
+ break;
+ default:
+ if (b) {
+ a.push(',');
+ }
+ a.push(v === null ? "null" : OG.common.JSON.encode(v));
+ b = true;
+ }
+ }
+ a.push("]");
+ return a.join("");
+ },
+ doEncode = function (o) {
+ if (!OG.Util.isDefined(o) || o === null) {
+ return "null";
+ } else if (OG.Util.isArray(o)) {
+ return encodeArray(o);
+ } else if (OG.Util.isDate(o)) {
+ return OG.common.JSON.encodeDate(o);
+ } else if (OG.Util.isString(o)) {
+ return encodeString(o);
+ } else if (typeof o === "number") {
+ //don't use isNumber here, since finite checks happen inside isNumber
+ return isFinite(o) ? String(o) : "null";
+ } else if (OG.Util.isBoolean(o)) {
+ return String(o);
+ } else {
+ var a = ["{"], b, i, v;
+ for (i in o) {
+ // don't encode DOM objects
+ if (!o.getElementsByTagName) {
+ if (!useHasOwn || o.hasOwnProperty(i)) {
+ v = o[i];
+ switch (typeof v) {
+ case "undefined":
+ case "function":
+ case "unknown":
+ break;
+ default:
+ if (b) {
+ a.push(',');
+ }
+ a.push(doEncode(i), ":",
+ v === null ? "null" : doEncode(v));
+ b = true;
+ }
+ }
+ }
+ }
+ a.push("}");
+ return a.join("");
+ }
+ };
+
+ /**
+ * Encodes a Date. This returns the actual string which is inserted into the JSON string as the literal expression.
+ * The returned value includes enclosing double quotation marks.
+ * The default return format is "yyyy-mm-ddThh:mm:ss".
+ * To override this:
+ OG.common.JSON.encodeDate = function(d) {
return d.format('"Y-m-d"');
};
-
- * @param {Date} d The Date to encode
- * @return {String} The string literal to use in a JSON string.
- */
- this.encodeDate = function (o) {
- return '"' + o.getFullYear() + "-" +
- pad(o.getMonth() + 1) + "-" +
- pad(o.getDate()) + "T" +
- pad(o.getHours()) + ":" +
- pad(o.getMinutes()) + ":" +
- pad(o.getSeconds()) + '"';
- };
-
- /**
- * Encodes an Object, Array or other value
- * @param {Mixed} o The variable to encode
- * @return {String} The JSON string
- */
- this.encode = (function () {
- var ec;
- return function (o) {
- if (!ec) {
- // setup encoding function on first access
- ec = isNative() ? JSON.stringify : doEncode;
- }
- return ec(o);
- };
- }());
-
-
- /**
- * Decodes (parses) a JSON string to an object. If the JSON is invalid, this function throws a SyntaxError unless the safe option is set.
- * @param {String} json The JSON string
- * @return {Object} The resulting object
- */
- this.decode = (function () {
- var dc;
- return function (json) {
- if (!dc) {
- // setup decoding function on first access
- dc = isNative() ? JSON.parse : doDecode;
- }
- return dc(json);
- };
- }());
+
+ * @param {Date} d The Date to encode
+ * @return {String} The string literal to use in a JSON string.
+ */
+ this.encodeDate = function (o) {
+ return '"' + o.getFullYear() + "-" +
+ pad(o.getMonth() + 1) + "-" +
+ pad(o.getDate()) + "T" +
+ pad(o.getHours()) + ":" +
+ pad(o.getMinutes()) + ":" +
+ pad(o.getSeconds()) + '"';
+ };
+
+ /**
+ * Encodes an Object, Array or other value
+ * @param {Mixed} o The variable to encode
+ * @return {String} The JSON string
+ */
+ this.encode = (function () {
+ var ec;
+ return function (o) {
+ if (!ec) {
+ // setup encoding function on first access
+ ec = isNative() ? JSON.stringify : doEncode;
+ }
+ return ec(o);
+ };
+ }());
+
+
+ /**
+ * Decodes (parses) a JSON string to an object. If the JSON is invalid, this function throws a SyntaxError unless the safe option is set.
+ * @param {String} json The JSON string
+ * @return {Object} The resulting object
+ */
+ this.decode = (function () {
+ var dc;
+ return function (json) {
+ if (!dc) {
+ // setup decoding function on first access
+ dc = isNative() ? JSON.parse : doDecode;
+ }
+ return dc(json);
+ };
+ }());
})();
OG.JSON = OG.common.JSON;
@@ -7778,11 +7788,11 @@ OG.JSON = OG.common.JSON;
* @author Seungpil Park
*/
OG.geometry.Style = function (style) {
- var DEFAULT_STYLE = {}, _style = {};
+ var DEFAULT_STYLE = {}, _style = {};
- OG.Util.apply(_style, style, DEFAULT_STYLE);
+ OG.Util.apply(_style, style, DEFAULT_STYLE);
- OG.geometry.Style.superclass.call(this, _style);
+ OG.geometry.Style.superclass.call(this, _style);
};
OG.geometry.Style.prototype = new OG.common.HashMap();
OG.geometry.Style.superclass = OG.common.HashMap;
@@ -7947,445 +7957,445 @@ OG.Coordinate = OG.geometry.Coordinate;
*/
OG.geometry.Envelope = function (upperLeft, width, height) {
- /**
- * @type OG.geometry.Coordinate
- * @private
- */
- this._upperLeft = null;
-
- /**
- * @type Number
- * @private
- */
- this._width = width;
-
- /**
- * @type Number
- * @private
- */
- this._height = height;
-
- /**
- * @type OG.geometry.Coordinate
- * @private
- */
- this._upperRight = null;
-
- /**
- * @type OG.geometry.Coordinate
- * @private
- */
- this._lowerLeft = null;
-
- /**
- * @type OG.geometry.Coordinate
- * @private
- */
- this._lowerRight = null;
-
- /**
- * @type OG.geometry.Coordinate
- * @private
- */
- this._leftCenter = null;
-
- /**
- * @type OG.geometry.Coordinate
- * @private
- */
- this._leftCenter = null;
-
- /**
- * @type OG.geometry.Coordinate
- * @private
- */
- this._upperCenter = null;
-
- /**
- * @type OG.geometry.Coordinate
- * @private
- */
- this._rightCenter = null;
-
- /**
- * @type OG.geometry.Coordinate
- * @private
- */
- this._lowerCenter = null;
-
- /**
- * @type OG.geometry.Coordinate
- * @private
- */
- this._centroid = null;
-
- // Array 좌표를 OG.geometry.Coordinate 로 변환
- if (upperLeft) {
- if (upperLeft.constructor === Array) {
- this._upperLeft = new OG.geometry.Coordinate(upperLeft);
- } else {
- this._upperLeft = new OG.geometry.Coordinate(upperLeft.x, upperLeft.y);
- }
- }
+ /**
+ * @type OG.geometry.Coordinate
+ * @private
+ */
+ this._upperLeft = null;
+
+ /**
+ * @type Number
+ * @private
+ */
+ this._width = width;
+
+ /**
+ * @type Number
+ * @private
+ */
+ this._height = height;
+
+ /**
+ * @type OG.geometry.Coordinate
+ * @private
+ */
+ this._upperRight = null;
+
+ /**
+ * @type OG.geometry.Coordinate
+ * @private
+ */
+ this._lowerLeft = null;
+
+ /**
+ * @type OG.geometry.Coordinate
+ * @private
+ */
+ this._lowerRight = null;
+
+ /**
+ * @type OG.geometry.Coordinate
+ * @private
+ */
+ this._leftCenter = null;
+
+ /**
+ * @type OG.geometry.Coordinate
+ * @private
+ */
+ this._leftCenter = null;
+
+ /**
+ * @type OG.geometry.Coordinate
+ * @private
+ */
+ this._upperCenter = null;
+
+ /**
+ * @type OG.geometry.Coordinate
+ * @private
+ */
+ this._rightCenter = null;
+
+ /**
+ * @type OG.geometry.Coordinate
+ * @private
+ */
+ this._lowerCenter = null;
+
+ /**
+ * @type OG.geometry.Coordinate
+ * @private
+ */
+ this._centroid = null;
+
+ // Array 좌표를 OG.geometry.Coordinate 로 변환
+ if (upperLeft) {
+ if (upperLeft.constructor === Array) {
+ this._upperLeft = new OG.geometry.Coordinate(upperLeft);
+ } else {
+ this._upperLeft = new OG.geometry.Coordinate(upperLeft.x, upperLeft.y);
+ }
+ }
};
OG.geometry.Envelope.prototype = {
- /**
- * 기준 좌상단 좌표를 반환한다.
- *
- * @return {OG.geometry.Coordinate} 좌상단 좌표
- */
- getUpperLeft: function () {
- return this._upperLeft;
- },
-
- /**
- * 주어진 좌표로 기준 좌상단 좌표를 설정한다. 새로 설정된 값으로 이동된다.
- *
- * @param {OG.geometry.Coordinate|Number[]} upperLeft 좌상단 좌표
- */
- setUpperLeft: function (upperLeft) {
- if (upperLeft.constructor === Array) {
- upperLeft = new OG.geometry.Coordinate(upperLeft[0], upperLeft[1]);
- }
-
- this._upperLeft = upperLeft;
- this._reset();
- },
-
- /**
- * 우상단 좌표를 반환한다.
- *
- * @return {OG.geometry.Coordinate} 우상단 좌표
- */
- getUpperRight: function () {
- if (!this._upperRight) {
- this._upperRight = new OG.geometry.Coordinate(this._upperLeft.x + this._width, this._upperLeft.y);
- }
- return this._upperRight;
- },
-
- /**
- * 우하단 좌표를 반환한다.
- *
- * @return {OG.geometry.Coordinate} 우하단 좌표
- */
- getLowerRight: function () {
- if (!this._lowerRight) {
- this._lowerRight = new OG.geometry.Coordinate(this._upperLeft.x + this._width, this._upperLeft.y + this._height);
- }
- return this._lowerRight;
- },
-
- /**
- * 좌하단 좌표를 반환한다.
- *
- * @return {OG.geometry.Coordinate} 좌하단 좌표
- */
- getLowerLeft: function () {
- if (!this._lowerLeft) {
- this._lowerLeft = new OG.geometry.Coordinate(this._upperLeft.x, this._upperLeft.y + this._height);
- }
- return this._lowerLeft;
- },
-
- /**
- * 좌중간 좌표를 반환한다.
- *
- * @return {OG.geometry.Coordinate} 좌중간 좌표
- */
- getLeftCenter: function () {
- if (!this._leftCenter) {
- this._leftCenter = new OG.geometry.Coordinate(this._upperLeft.x, OG.Util.round(this._upperLeft.y + this._height / 2));
- }
- return this._leftCenter;
- },
-
- /**
- * 상단중간 좌표를 반환한다.
- *
- * @return {OG.geometry.Coordinate} 상단중간 좌표
- */
- getUpperCenter: function () {
- if (!this._upperCenter) {
- this._upperCenter = new OG.geometry.Coordinate(OG.Util.round(this._upperLeft.x + this._width / 2), this._upperLeft.y);
- }
- return this._upperCenter;
- },
-
- /**
- * 우중간 좌표를 반환한다.
- *
- * @return {OG.geometry.Coordinate} 우중간 좌표
- */
- getRightCenter: function () {
- if (!this._rightCenter) {
- this._rightCenter = new OG.geometry.Coordinate(this._upperLeft.x + this._width, OG.Util.round(this._upperLeft.y + this._height / 2));
- }
- return this._rightCenter;
- },
-
- /**
- * 하단중간 좌표를 반환한다.
- *
- * @return {OG.geometry.Coordinate} 하단중간 좌표
- */
- getLowerCenter: function () {
- if (!this._lowerCenter) {
- this._lowerCenter = new OG.geometry.Coordinate(OG.Util.round(this._upperLeft.x + this._width / 2), this._upperLeft.y + this._height);
- }
- return this._lowerCenter;
- },
-
- /**
- * Envelope 의 중심좌표를 반환한다.
- *
- * @return {OG.geometry.Coordinate} 중심좌표
- */
- getCentroid: function () {
- if (!this._centroid) {
- this._centroid = new OG.geometry.Coordinate(OG.Util.round(this._upperLeft.x + this._width / 2),
- OG.Util.round(this._upperLeft.y + this._height / 2));
- }
-
- return this._centroid;
- },
-
- /**
- * 주어진 좌표로 중심 좌표를 설정한다. 새로 설정된 값으로 이동된다.
- *
- * @param {OG.geometry.Coordinate|Number[]} centroid 중심좌표
- */
- setCentroid: function (centroid) {
- if (centroid.constructor === Array) {
- centroid = new OG.geometry.Coordinate(centroid[0], centroid[1]);
- }
-
- this.move(centroid.x - this.getCentroid().x, centroid.y - this.getCentroid().y);
- },
-
- /**
- * Envelope 의 가로 사이즈를 반환한다.
- *
- * @return {Number} 너비
- */
- getWidth: function () {
- return this._width;
- },
-
- /**
- * 주어진 값으로 Envelope 의 가로 사이즈를 설정한다.
- *
- * @param {Number} width 너비
- */
- setWidth: function (width) {
- this._width = width;
- this._reset();
- },
-
- /**
- * Envelope 의 세로 사이즈를 반환한다.
- *
- * @return {Number} 높이
- */
- getHeight: function () {
- return this._height;
- },
-
- /**
- * 주어진 값으로 Envelope 의 세로 사이즈를 설정한다.
- *
- * @param {Number} height 높이
- */
- setHeight: function (height) {
- this._height = height;
- this._reset();
- },
-
- /**
- * Envelope 모든 꼭지점을 반환한다.
- * 좌상단좌표부터 시계방향으로 꼭지점 Array 를 반환한다.
- *
- * @return {OG.geometry.Coordinate[]} 꼭지점 좌표 Array : [좌상단, 상단중간, 우상단, 우중간, 우하단, 하단중간, 좌하단, 좌중간, 좌상단]
- */
- getVertices: function () {
- var vertices = [];
-
- vertices.push(this.getUpperLeft());
- vertices.push(this.getUpperCenter());
- vertices.push(this.getUpperRight());
- vertices.push(this.getRightCenter());
- vertices.push(this.getLowerRight());
- vertices.push(this.getLowerCenter());
- vertices.push(this.getLowerLeft());
- vertices.push(this.getLeftCenter());
- vertices.push(this.getUpperLeft());
-
- return vertices;
- },
-
- /**
- * 주어진 좌표값이 Envelope 영역에 포함되는지 비교한다.
- *
- * @param {OG.geometry.Coordinate|Number[]} coordinate 좌표값
- * @return {Boolean} true:포함, false:비포함
- */
- isContains: function (coordinate) {
- if (coordinate.constructor === Array) {
- return coordinate[0] >= this._upperLeft.x && coordinate[0] <= this.getLowerRight().x &&
- coordinate[1] >= this._upperLeft.y && coordinate[1] <= this.getLowerRight().y;
- } else {
- return coordinate.x >= this._upperLeft.x && coordinate.x <= this.getLowerRight().x &&
- coordinate.y >= this._upperLeft.y && coordinate.y <= this.getLowerRight().y;
- }
- },
-
- /**
- * 주어진 모든 좌표값이 Envelope 영역에 포함되는지 비교한다.
- *
- * @param {OG.geometry.Coordinate[]} coordinateArray 좌표값 Array
- * @return {Boolean} true:포함, false:비포함
- */
- isContainsAll: function (coordinateArray) {
- for (var i = 0,leni = coordinateArray.length; i < leni; i++) {
- if (!this.isContains(coordinateArray[i])) {
- return false;
- }
- }
-
- return true;
- },
-
- /**
- * 몇개의 좌표값이 Envelope 영역에 포함되는지 비교한다.
- *
- * @param {OG.geometry.Coordinate[]} coordinateArray 좌표값 Array
- * @return {Boolean} true:포함, false:비포함
- */
- getHowManyContains: function (coordinateArray) {
- var i, time = 0;
- for (var i = 0,leni = coordinateArray.length; i < leni; i++) {
- if (this.isContains(coordinateArray[i])) {
- time += 1;
- }
- }
-
- return time;
- },
-
- /**
- * 주어진 좌표값들이 하나라도 Envelope 영역에 포함되는지 비교한다.
- *
- * @param {OG.geometry.Coordinate[]} coordinateArray 좌표값 Array
- * @return {Boolean} true:포함, false:비포함
- */
- isContainsOnce: function (coordinateArray) {
- var i;
- for (var i = 0,leni = coordinateArray.length; i < leni; i++) {
- if (this.isContains(coordinateArray[i])) {
- return true;
- }
- }
-
- return false;
- },
-
- /**
- * 크기는 고정한 채 가로, 세로 Offset 만큼 Envelope 을 이동한다.
- *
- * @param {Number} offsetX 가로 Offset
- * @param {Number} offsetY 세로 Offset
- * @return {OG.geometry.Envelope} 이동된 Envelope
- */
- move: function (offsetX, offsetY) {
- this._upperLeft.move(offsetX, offsetY);
- this._reset();
-
- return this;
- },
-
- /**
- * 상, 하, 좌, 우 외곽선을 이동하여 Envelope 을 리사이즈 한다.
- *
- * @param {Number} upper 상단 라인 이동 Offset(위 방향으로 +)
- * @param {Number} lower 하단 라인 이동 Offset(아래 방향으로 +)
- * @param {Number} left 좌측 라인 이동 Offset(좌측 방향으로 +)
- * @param {Number} right 우측 라인 이동 Offset(우측 방향으로 +)
- * @return {OG.geometry.Envelope} 리사이즈된 Envelope
- */
- resize: function (upper, lower, left, right) {
- upper = upper || 0;
- lower = lower || 0;
- left = left || 0;
- right = right || 0;
-
- if (this._width + (left + right) < 0 || this._height + (upper + lower) < 0) {
- throw new OG.ParamError();
- }
-
- this._upperLeft.move(-1 * left, -1 * upper);
- this._width += (left + right);
- this._height += (upper + lower);
- this._reset();
-
- return this;
- },
-
- /**
- * 주어진 Envelope 영역과 같은지 비교한다.
- *
- * @param {OG.geometry.Envelope} Envelope 영역
- * @return {Boolean} true:같음, false:다름
- */
- isEquals: function (envelope) {
- if (envelope && envelope instanceof OG.geometry.Envelope) {
- if (this.getUpperLeft().isEquals(envelope.getUpperLeft()) &&
- this.getWidth() === envelope.getWidth() &&
- this.getHeight() === envelope.getHeight()) {
- return true;
- }
- }
-
- return false;
- },
-
- /**
- * 객체 프라퍼티 정보를 JSON 스트링으로 반환한다.
- *
- * @return {String} 프라퍼티 정보
- * @override
- */
- toString: function () {
- var s = [];
- s.push("upperLeft:" + this.getUpperLeft());
- s.push("width:" + this.getWidth());
- s.push("height:" + this.getHeight());
- s.push("upperRight:" + this.getUpperRight());
- s.push("lowerLeft:" + this.getLowerLeft());
- s.push("lowerRight:" + this.getLowerRight());
- s.push("leftCenter:" + this.getLeftCenter());
- s.push("upperCenter:" + this.getUpperCenter());
- s.push("rightCenter:" + this.getRightCenter());
- s.push("lowerCenter:" + this.getLowerCenter());
- s.push("centroid:" + this.getCentroid());
-
- return "{" + s.join() + "}";
- },
-
- /**
- * _upperLeft, _width, _height 를 제외한 private 멤버 변수의 값을 리셋한다.
- *
- * @private
- */
- _reset: function () {
- this._upperRight = null;
- this._lowerLeft = null;
- this._lowerRight = null;
- this._leftCenter = null;
- this._upperCenter = null;
- this._rightCenter = null;
- this._lowerCenter = null;
- this._centroid = null;
- }
+ /**
+ * 기준 좌상단 좌표를 반환한다.
+ *
+ * @return {OG.geometry.Coordinate} 좌상단 좌표
+ */
+ getUpperLeft: function () {
+ return this._upperLeft;
+ },
+
+ /**
+ * 주어진 좌표로 기준 좌상단 좌표를 설정한다. 새로 설정된 값으로 이동된다.
+ *
+ * @param {OG.geometry.Coordinate|Number[]} upperLeft 좌상단 좌표
+ */
+ setUpperLeft: function (upperLeft) {
+ if (upperLeft.constructor === Array) {
+ upperLeft = new OG.geometry.Coordinate(upperLeft[0], upperLeft[1]);
+ }
+
+ this._upperLeft = upperLeft;
+ this._reset();
+ },
+
+ /**
+ * 우상단 좌표를 반환한다.
+ *
+ * @return {OG.geometry.Coordinate} 우상단 좌표
+ */
+ getUpperRight: function () {
+ if (!this._upperRight) {
+ this._upperRight = new OG.geometry.Coordinate(this._upperLeft.x + this._width, this._upperLeft.y);
+ }
+ return this._upperRight;
+ },
+
+ /**
+ * 우하단 좌표를 반환한다.
+ *
+ * @return {OG.geometry.Coordinate} 우하단 좌표
+ */
+ getLowerRight: function () {
+ if (!this._lowerRight) {
+ this._lowerRight = new OG.geometry.Coordinate(this._upperLeft.x + this._width, this._upperLeft.y + this._height);
+ }
+ return this._lowerRight;
+ },
+
+ /**
+ * 좌하단 좌표를 반환한다.
+ *
+ * @return {OG.geometry.Coordinate} 좌하단 좌표
+ */
+ getLowerLeft: function () {
+ if (!this._lowerLeft) {
+ this._lowerLeft = new OG.geometry.Coordinate(this._upperLeft.x, this._upperLeft.y + this._height);
+ }
+ return this._lowerLeft;
+ },
+
+ /**
+ * 좌중간 좌표를 반환한다.
+ *
+ * @return {OG.geometry.Coordinate} 좌중간 좌표
+ */
+ getLeftCenter: function () {
+ if (!this._leftCenter) {
+ this._leftCenter = new OG.geometry.Coordinate(this._upperLeft.x, OG.Util.round(this._upperLeft.y + this._height / 2));
+ }
+ return this._leftCenter;
+ },
+
+ /**
+ * 상단중간 좌표를 반환한다.
+ *
+ * @return {OG.geometry.Coordinate} 상단중간 좌표
+ */
+ getUpperCenter: function () {
+ if (!this._upperCenter) {
+ this._upperCenter = new OG.geometry.Coordinate(OG.Util.round(this._upperLeft.x + this._width / 2), this._upperLeft.y);
+ }
+ return this._upperCenter;
+ },
+
+ /**
+ * 우중간 좌표를 반환한다.
+ *
+ * @return {OG.geometry.Coordinate} 우중간 좌표
+ */
+ getRightCenter: function () {
+ if (!this._rightCenter) {
+ this._rightCenter = new OG.geometry.Coordinate(this._upperLeft.x + this._width, OG.Util.round(this._upperLeft.y + this._height / 2));
+ }
+ return this._rightCenter;
+ },
+
+ /**
+ * 하단중간 좌표를 반환한다.
+ *
+ * @return {OG.geometry.Coordinate} 하단중간 좌표
+ */
+ getLowerCenter: function () {
+ if (!this._lowerCenter) {
+ this._lowerCenter = new OG.geometry.Coordinate(OG.Util.round(this._upperLeft.x + this._width / 2), this._upperLeft.y + this._height);
+ }
+ return this._lowerCenter;
+ },
+
+ /**
+ * Envelope 의 중심좌표를 반환한다.
+ *
+ * @return {OG.geometry.Coordinate} 중심좌표
+ */
+ getCentroid: function () {
+ if (!this._centroid) {
+ this._centroid = new OG.geometry.Coordinate(OG.Util.round(this._upperLeft.x + this._width / 2),
+ OG.Util.round(this._upperLeft.y + this._height / 2));
+ }
+
+ return this._centroid;
+ },
+
+ /**
+ * 주어진 좌표로 중심 좌표를 설정한다. 새로 설정된 값으로 이동된다.
+ *
+ * @param {OG.geometry.Coordinate|Number[]} centroid 중심좌표
+ */
+ setCentroid: function (centroid) {
+ if (centroid.constructor === Array) {
+ centroid = new OG.geometry.Coordinate(centroid[0], centroid[1]);
+ }
+
+ this.move(centroid.x - this.getCentroid().x, centroid.y - this.getCentroid().y);
+ },
+
+ /**
+ * Envelope 의 가로 사이즈를 반환한다.
+ *
+ * @return {Number} 너비
+ */
+ getWidth: function () {
+ return this._width;
+ },
+
+ /**
+ * 주어진 값으로 Envelope 의 가로 사이즈를 설정한다.
+ *
+ * @param {Number} width 너비
+ */
+ setWidth: function (width) {
+ this._width = width;
+ this._reset();
+ },
+
+ /**
+ * Envelope 의 세로 사이즈를 반환한다.
+ *
+ * @return {Number} 높이
+ */
+ getHeight: function () {
+ return this._height;
+ },
+
+ /**
+ * 주어진 값으로 Envelope 의 세로 사이즈를 설정한다.
+ *
+ * @param {Number} height 높이
+ */
+ setHeight: function (height) {
+ this._height = height;
+ this._reset();
+ },
+
+ /**
+ * Envelope 모든 꼭지점을 반환한다.
+ * 좌상단좌표부터 시계방향으로 꼭지점 Array 를 반환한다.
+ *
+ * @return {OG.geometry.Coordinate[]} 꼭지점 좌표 Array : [좌상단, 상단중간, 우상단, 우중간, 우하단, 하단중간, 좌하단, 좌중간, 좌상단]
+ */
+ getVertices: function () {
+ var vertices = [];
+
+ vertices.push(this.getUpperLeft());
+ vertices.push(this.getUpperCenter());
+ vertices.push(this.getUpperRight());
+ vertices.push(this.getRightCenter());
+ vertices.push(this.getLowerRight());
+ vertices.push(this.getLowerCenter());
+ vertices.push(this.getLowerLeft());
+ vertices.push(this.getLeftCenter());
+ vertices.push(this.getUpperLeft());
+
+ return vertices;
+ },
+
+ /**
+ * 주어진 좌표값이 Envelope 영역에 포함되는지 비교한다.
+ *
+ * @param {OG.geometry.Coordinate|Number[]} coordinate 좌표값
+ * @return {Boolean} true:포함, false:비포함
+ */
+ isContains: function (coordinate) {
+ if (coordinate.constructor === Array) {
+ return coordinate[0] >= this._upperLeft.x && coordinate[0] <= this.getLowerRight().x &&
+ coordinate[1] >= this._upperLeft.y && coordinate[1] <= this.getLowerRight().y;
+ } else {
+ return coordinate.x >= this._upperLeft.x && coordinate.x <= this.getLowerRight().x &&
+ coordinate.y >= this._upperLeft.y && coordinate.y <= this.getLowerRight().y;
+ }
+ },
+
+ /**
+ * 주어진 모든 좌표값이 Envelope 영역에 포함되는지 비교한다.
+ *
+ * @param {OG.geometry.Coordinate[]} coordinateArray 좌표값 Array
+ * @return {Boolean} true:포함, false:비포함
+ */
+ isContainsAll: function (coordinateArray) {
+ for (var i = 0, leni = coordinateArray.length; i < leni; i++) {
+ if (!this.isContains(coordinateArray[i])) {
+ return false;
+ }
+ }
+
+ return true;
+ },
+
+ /**
+ * 몇개의 좌표값이 Envelope 영역에 포함되는지 비교한다.
+ *
+ * @param {OG.geometry.Coordinate[]} coordinateArray 좌표값 Array
+ * @return {Boolean} true:포함, false:비포함
+ */
+ getHowManyContains: function (coordinateArray) {
+ var i, time = 0;
+ for (var i = 0, leni = coordinateArray.length; i < leni; i++) {
+ if (this.isContains(coordinateArray[i])) {
+ time += 1;
+ }
+ }
+
+ return time;
+ },
+
+ /**
+ * 주어진 좌표값들이 하나라도 Envelope 영역에 포함되는지 비교한다.
+ *
+ * @param {OG.geometry.Coordinate[]} coordinateArray 좌표값 Array
+ * @return {Boolean} true:포함, false:비포함
+ */
+ isContainsOnce: function (coordinateArray) {
+ var i;
+ for (var i = 0, leni = coordinateArray.length; i < leni; i++) {
+ if (this.isContains(coordinateArray[i])) {
+ return true;
+ }
+ }
+
+ return false;
+ },
+
+ /**
+ * 크기는 고정한 채 가로, 세로 Offset 만큼 Envelope 을 이동한다.
+ *
+ * @param {Number} offsetX 가로 Offset
+ * @param {Number} offsetY 세로 Offset
+ * @return {OG.geometry.Envelope} 이동된 Envelope
+ */
+ move: function (offsetX, offsetY) {
+ this._upperLeft.move(offsetX, offsetY);
+ this._reset();
+
+ return this;
+ },
+
+ /**
+ * 상, 하, 좌, 우 외곽선을 이동하여 Envelope 을 리사이즈 한다.
+ *
+ * @param {Number} upper 상단 라인 이동 Offset(위 방향으로 +)
+ * @param {Number} lower 하단 라인 이동 Offset(아래 방향으로 +)
+ * @param {Number} left 좌측 라인 이동 Offset(좌측 방향으로 +)
+ * @param {Number} right 우측 라인 이동 Offset(우측 방향으로 +)
+ * @return {OG.geometry.Envelope} 리사이즈된 Envelope
+ */
+ resize: function (upper, lower, left, right) {
+ upper = upper || 0;
+ lower = lower || 0;
+ left = left || 0;
+ right = right || 0;
+
+ if (this._width + (left + right) < 0 || this._height + (upper + lower) < 0) {
+ throw new OG.ParamError();
+ }
+
+ this._upperLeft.move(-1 * left, -1 * upper);
+ this._width += (left + right);
+ this._height += (upper + lower);
+ this._reset();
+
+ return this;
+ },
+
+ /**
+ * 주어진 Envelope 영역과 같은지 비교한다.
+ *
+ * @param {OG.geometry.Envelope} Envelope 영역
+ * @return {Boolean} true:같음, false:다름
+ */
+ isEquals: function (envelope) {
+ if (envelope && envelope instanceof OG.geometry.Envelope) {
+ if (this.getUpperLeft().isEquals(envelope.getUpperLeft()) &&
+ this.getWidth() === envelope.getWidth() &&
+ this.getHeight() === envelope.getHeight()) {
+ return true;
+ }
+ }
+
+ return false;
+ },
+
+ /**
+ * 객체 프라퍼티 정보를 JSON 스트링으로 반환한다.
+ *
+ * @return {String} 프라퍼티 정보
+ * @override
+ */
+ toString: function () {
+ var s = [];
+ s.push("upperLeft:" + this.getUpperLeft());
+ s.push("width:" + this.getWidth());
+ s.push("height:" + this.getHeight());
+ s.push("upperRight:" + this.getUpperRight());
+ s.push("lowerLeft:" + this.getLowerLeft());
+ s.push("lowerRight:" + this.getLowerRight());
+ s.push("leftCenter:" + this.getLeftCenter());
+ s.push("upperCenter:" + this.getUpperCenter());
+ s.push("rightCenter:" + this.getRightCenter());
+ s.push("lowerCenter:" + this.getLowerCenter());
+ s.push("centroid:" + this.getCentroid());
+
+ return "{" + s.join() + "}";
+ },
+
+ /**
+ * _upperLeft, _width, _height 를 제외한 private 멤버 변수의 값을 리셋한다.
+ *
+ * @private
+ */
+ _reset: function () {
+ this._upperRight = null;
+ this._lowerLeft = null;
+ this._lowerRight = null;
+ this._leftCenter = null;
+ this._upperCenter = null;
+ this._rightCenter = null;
+ this._lowerCenter = null;
+ this._centroid = null;
+ }
};
OG.geometry.Envelope.prototype.constructor = OG.geometry.Envelope;
OG.Envelope = OG.geometry.Envelope;
@@ -8525,7 +8535,7 @@ OG.geometry.Geometry.prototype = {
return _coordinate.distance(vertices[0]);
}
- for (var i = 0,leni = vertices.length - 1; i < leni; i++) {
+ for (var i = 0, leni = vertices.length - 1; i < leni; i++) {
distance = this.distanceToLine(_coordinate, [vertices[i], vertices[i + 1]]);
if (distance < minDistance) {
minDistance = distance;
@@ -8554,7 +8564,7 @@ OG.geometry.Geometry.prototype = {
var length = 0,
vertices = this.getVertices(),
i;
- for (var i = 0,leni = vertices.length - 1; i < leni; i++) {
+ for (var i = 0, leni = vertices.length - 1; i < leni; i++) {
length += vertices[i].distance(vertices[i + 1]);
}
@@ -8762,7 +8772,7 @@ OG.geometry.Geometry.prototype = {
intersectToLine: function (line) {
var vertices = this.getVertices(), result = [], point, i,
contains = function (coordinateArray, coordinate) {
- for (var k = 0,lenk = coordinateArray.length; k < lenk; k++) {
+ for (var k = 0, lenk = coordinateArray.length; k < lenk; k++) {
if (coordinateArray[k].isEquals(coordinate)) {
return true;
}
@@ -8770,7 +8780,7 @@ OG.geometry.Geometry.prototype = {
return false;
};
- for (var i = 0,leni = vertices.length - 1; i < leni; i++) {
+ for (var i = 0, leni = vertices.length - 1; i < leni; i++) {
point = this.intersectLineToLine(line, [vertices[i], vertices[i + 1]]);
if (point && !contains(result, point)) {
result.push(point);
@@ -8873,8 +8883,8 @@ OG.geometry.Geometry.prototype = {
var result = [],
a = (to.x - from.x) * (to.x - from.x) +
(to.y - from.y) * (to.y - from.y),
- b = 2 * ( (to.x - from.x) * (from.x - center.x) +
- (to.y - from.y) * (from.y - center.y) ),
+ b = 2 * ((to.x - from.x) * (from.x - center.x) +
+ (to.y - from.y) * (from.y - center.y)),
cc = center.x * center.x + center.y * center.y + from.x * from.x + from.y * from.y -
2 * (center.x * from.x + center.y * from.y) - radius * radius,
deter = b * b - 4 * a * cc,
@@ -8943,13 +8953,13 @@ OG.geometry.Geometry.prototype = {
}
m1 = (B.y - A.y) / (B.x - A.x);
- b1 = A.y - ( m1 * A.x );
+ b1 = A.y - (m1 * A.x);
- m2 = ( 1 / m1 ) * -1;
- b2 = p.y - ( m2 * p.x );
+ m2 = (1 / m1) * -1;
+ b2 = p.y - (m2 * p.x);
x = (b2 - b1) / (m1 - m2);
- y = ( x * m1 ) + b1;
+ y = (x * m1) + b1;
return this.convertCoordinate([x, y]);
},
@@ -9027,8 +9037,8 @@ OG.geometry.Geometry.prototype = {
width = boundary._width;
height = boundary._height;
- x = upperLeft.x + ( width * (px / 100) );
- y = upperLeft.y + ( height * (py / 100) );
+ x = upperLeft.x + (width * (px / 100));
+ y = upperLeft.y + (height * (py / 100));
_coordinate = this.convertCoordinate([Math.round(x), Math.round(y)]);
}
@@ -9241,7 +9251,7 @@ OG.geometry.PolyLine = function (vertices) {
// Array 좌표를 OG.geometry.Coordinate 로 변환
if (vertices && vertices.length > 0) {
- for (var i = 0,leni = vertices.length; i < leni; i++) {
+ for (var i = 0, leni = vertices.length; i < leni; i++) {
this.vertices.push(this.convertCoordinate(vertices[i]));
}
}
@@ -9275,7 +9285,7 @@ OG.geometry.PolyLine.prototype.setVertices = function (vertices) {
*/
OG.geometry.PolyLine.prototype.move = function (offsetX, offsetY) {
this.getBoundary().move(offsetX, offsetY);
- for (var i = 0,leni = this.vertices.length; i < leni; i++) {
+ for (var i = 0, leni = this.vertices.length; i < leni; i++) {
this.vertices[i].move(offsetX, offsetY);
}
@@ -9307,7 +9317,7 @@ OG.geometry.PolyLine.prototype.resize = function (upper, lower, left, right) {
throw new OG.ParamError();
}
- for (var i = 0,leni = this.vertices.length; i < leni; i++) {
+ for (var i = 0, leni = this.vertices.length; i < leni; i++) {
this.vertices[i].x = OG.Util.round((upperLeft.x - left) + (this.vertices[i].x - upperLeft.x) * rateWidth);
this.vertices[i].y = OG.Util.round((upperLeft.y - upper) + (this.vertices[i].y - upperLeft.y) * rateHeight);
}
@@ -9326,7 +9336,7 @@ OG.geometry.PolyLine.prototype.resize = function (upper, lower, left, right) {
*/
OG.geometry.PolyLine.prototype.rotate = function (angle, origin) {
origin = origin || this.getCentroid();
- for (var i = 0,leni = this.vertices.length; i < leni; i++) {
+ for (var i = 0, leni = this.vertices.length; i < leni; i++) {
this.vertices[i].rotate(angle, origin);
}
this.reset();
@@ -9533,23 +9543,23 @@ OG.geometry.Curve.prototype.toString = function () {
*/
OG.geometry.Ellipse = function (center, radiusX, radiusY, angle) {
- var _angle = angle || 0, _center = this.convertCoordinate(center), controlPoints = [], theta, i;
+ var _angle = angle || 0, _center = this.convertCoordinate(center), controlPoints = [], theta, i;
- if (_center) {
- for (i = -45; i <= 405; i += 45) {
- theta = Math.PI / 180 * i;
- controlPoints.push((new OG.geometry.Coordinate(
- OG.Util.round(_center.x + radiusX * Math.cos(theta)),
- OG.Util.round(_center.y + radiusY * Math.sin(theta))
- )).rotate(_angle, _center));
- }
- }
+ if (_center) {
+ for (i = -45; i <= 405; i += 45) {
+ theta = Math.PI / 180 * i;
+ controlPoints.push((new OG.geometry.Coordinate(
+ OG.Util.round(_center.x + radiusX * Math.cos(theta)),
+ OG.Util.round(_center.y + radiusY * Math.sin(theta))
+ )).rotate(_angle, _center));
+ }
+ }
- OG.geometry.Ellipse.superclass.call(this, controlPoints);
+ OG.geometry.Ellipse.superclass.call(this, controlPoints);
- this.TYPE = OG.Constants.GEOM_TYPE.ELLIPSE;
- this.IS_CLOSED = true;
- this.style = new OG.geometry.Style();
+ this.TYPE = OG.Constants.GEOM_TYPE.ELLIPSE;
+ this.IS_CLOSED = true;
+ this.style = new OG.geometry.Style();
};
OG.geometry.Ellipse.prototype = new OG.geometry.Curve();
OG.geometry.Ellipse.superclass = OG.geometry.Curve;
@@ -9563,12 +9573,12 @@ OG.Ellipse = OG.geometry.Ellipse;
* @override
*/
OG.geometry.Ellipse.prototype.getVertices = function () {
- var vertices = [], i;
- for (var i = 20,leni = this.vertices.length - 20; i < leni; i++) {
- vertices.push(this.vertices[i]);
- }
+ var vertices = [], i;
+ for (var i = 20, leni = this.vertices.length - 20; i < leni; i++) {
+ vertices.push(this.vertices[i]);
+ }
- return vertices;
+ return vertices;
};
/**
@@ -9578,12 +9588,12 @@ OG.geometry.Ellipse.prototype.getVertices = function () {
* @override
*/
OG.geometry.Ellipse.prototype.getControlPoints = function () {
- var controlPoints = [], i;
- for (var i = 10,leni = this.vertices.length - 10; i <= leni; i += 10) {
- controlPoints.push(this.vertices[i]);
- }
+ var controlPoints = [], i;
+ for (var i = 10, leni = this.vertices.length - 10; i <= leni; i += 10) {
+ controlPoints.push(this.vertices[i]);
+ }
- return controlPoints;
+ return controlPoints;
};
/**
@@ -9593,12 +9603,12 @@ OG.geometry.Ellipse.prototype.getControlPoints = function () {
* @override
*/
OG.geometry.Ellipse.prototype.getLength = function () {
- // π{5(a+b)/4 - ab/(a+b)}
- var controlPoints = this.getControlPoints(),
- center = this.getCentroid(),
- radiusX = center.distance(controlPoints[1]),
- radiusY = center.distance(controlPoints[3]);
- return Math.PI * (5 * (radiusX + radiusY) / 4 - radiusX * radiusY / (radiusX + radiusY));
+ // π{5(a+b)/4 - ab/(a+b)}
+ var controlPoints = this.getControlPoints(),
+ center = this.getCentroid(),
+ radiusX = center.distance(controlPoints[1]),
+ radiusY = center.distance(controlPoints[3]);
+ return Math.PI * (5 * (radiusX + radiusY) / 4 - radiusX * radiusY / (radiusX + radiusY));
};
/**
@@ -9608,20 +9618,20 @@ OG.geometry.Ellipse.prototype.getLength = function () {
* @override
*/
OG.geometry.Ellipse.prototype.toString = function () {
- var s = [],
- controlPoints = this.getControlPoints(),
- center = this.getCentroid(),
- radiusX = center.distance(controlPoints[1]),
- radiusY = center.distance(controlPoints[3]),
- angle = OG.Util.round(Math.atan2(controlPoints[1].y - center.y, controlPoints[1].x - center.x) * 180 / Math.PI);
+ var s = [],
+ controlPoints = this.getControlPoints(),
+ center = this.getCentroid(),
+ radiusX = center.distance(controlPoints[1]),
+ radiusY = center.distance(controlPoints[3]),
+ angle = OG.Util.round(Math.atan2(controlPoints[1].y - center.y, controlPoints[1].x - center.x) * 180 / Math.PI);
- s.push("type:'" + OG.Constants.GEOM_NAME[this.TYPE] + "'");
- s.push("center:" + center);
- s.push("radiusX:" + radiusX);
- s.push("radiusY:" + radiusY);
- s.push("angle:" + angle);
+ s.push("type:'" + OG.Constants.GEOM_NAME[this.TYPE] + "'");
+ s.push("center:" + center);
+ s.push("radiusX:" + radiusX);
+ s.push("radiusY:" + radiusY);
+ s.push("angle:" + angle);
- return "{" + s.join() + "}";
+ return "{" + s.join() + "}";
};
/**
* Cubic Bezier Curve 공간 기하 객체(Spatial Geometry Object)
@@ -9655,7 +9665,7 @@ OG.geometry.BezierCurve = function (controlPoints) {
// Array 좌표를 OG.geometry.Coordinate 로 변환
if (controlPoints && controlPoints.length > 0) {
- for (var i = 0,leni = controlPoints.length; i < leni; i++) {
+ for (var i = 0, leni = controlPoints.length; i < leni; i++) {
this.controlPoints.push(this.convertCoordinate(controlPoints[i]));
}
}
@@ -9665,7 +9675,7 @@ OG.geometry.BezierCurve = function (controlPoints) {
// t 는 0 ~ maxT 의 값으로, t 값의 증분값이 작을수록 세밀한 BezierCurve 를 그린다.
this.vertices = [];
- for (var t = 0,lent = bezier.maxT; t <= lent; t += 0.02) {
+ for (var t = 0, lent = bezier.maxT; t <= lent; t += 0.02) {
this.vertices.push(new OG.geometry.Coordinate(
OG.Util.round(bezier.getX(t)),
OG.Util.round(bezier.getY(t))
@@ -9703,7 +9713,7 @@ OG.geometry.BezierCurve.prototype.getVertices = function () {
// t 는 0 ~ maxT 의 값으로, t 값의 증분값이 작을수록 세밀한 BezierCurve 를 그린다.
this.vertices = [];
- for (var t = 0,lent = bezier.maxT; t <= lent; t += 0.02) {
+ for (var t = 0, lent = bezier.maxT; t <= lent; t += 0.02) {
this.vertices.push(new OG.geometry.Coordinate(
OG.Util.round(bezier.getX(t)),
OG.Util.round(bezier.getY(t))
@@ -9724,7 +9734,7 @@ OG.geometry.BezierCurve.prototype.getVertices = function () {
* @override
*/
OG.geometry.BezierCurve.prototype.move = function (offsetX, offsetY) {
- for (var i = 0,leni = this.controlPoints.length; i < leni; i++) {
+ for (var i = 0, leni = this.controlPoints.length; i < leni; i++) {
this.controlPoints[i].move(offsetX, offsetY);
}
this.reset();
@@ -9756,7 +9766,7 @@ OG.geometry.BezierCurve.prototype.resize = function (upper, lower, left, right)
*/
OG.geometry.BezierCurve.prototype.rotate = function (angle, origin) {
origin = origin || this.getCentroid();
- for (var i = 0,leni = this.controlPoints.length; i < leni; i++) {
+ for (var i = 0, leni = this.controlPoints.length; i < leni; i++) {
this.controlPoints[i].rotate(angle, origin);
}
this.reset();
@@ -9805,10 +9815,10 @@ OG.geometry.BezierCurve.prototype.reset = function () {
*/
OG.geometry.Circle = function (center, radius) {
- OG.geometry.Circle.superclass.call(this, center, radius, radius, 0);
+ OG.geometry.Circle.superclass.call(this, center, radius, radius, 0);
- this.TYPE = OG.Constants.GEOM_TYPE.CIRCLE;
- this.style = new OG.geometry.Style();
+ this.TYPE = OG.Constants.GEOM_TYPE.CIRCLE;
+ this.style = new OG.geometry.Style();
};
OG.geometry.Circle.prototype = new OG.geometry.Ellipse();
OG.geometry.Circle.superclass = OG.geometry.Ellipse;
@@ -9822,10 +9832,10 @@ OG.Circle = OG.geometry.Circle;
* @override
*/
OG.geometry.Circle.prototype.getLength = function () {
- var controlPoints = this.getControlPoints(),
- center = this.getCentroid(),
- radiusX = center.distance(controlPoints[1]);
- return 2 * Math.PI * radiusX;
+ var controlPoints = this.getControlPoints(),
+ center = this.getCentroid(),
+ radiusX = center.distance(controlPoints[1]);
+ return 2 * Math.PI * radiusX;
};
/**
@@ -9835,26 +9845,26 @@ OG.geometry.Circle.prototype.getLength = function () {
* @override
*/
OG.geometry.Circle.prototype.toString = function () {
- var s = [],
- controlPoints = this.getControlPoints(),
- center = this.getCentroid(),
- radiusX = center.distance(controlPoints[1]),
- radiusY = center.distance(controlPoints[3]),
- angle = OG.Util.round(Math.atan2(controlPoints[1].y - center.y, controlPoints[1].x - center.x) * 180 / Math.PI);
-
- if (radiusX === radiusY) {
- s.push("type:'" + OG.Constants.GEOM_NAME[this.TYPE] + "'");
- s.push("center:" + center);
- s.push("radius:" + radiusX);
- } else {
- s.push("type:'" + OG.Constants.GEOM_NAME[OG.Constants.GEOM_TYPE.ELLIPSE] + "'");
- s.push("center:" + center);
- s.push("radiusX:" + radiusX);
- s.push("radiusY:" + radiusY);
- s.push("angle:" + angle);
- }
-
- return "{" + s.join() + "}";
+ var s = [],
+ controlPoints = this.getControlPoints(),
+ center = this.getCentroid(),
+ radiusX = center.distance(controlPoints[1]),
+ radiusY = center.distance(controlPoints[3]),
+ angle = OG.Util.round(Math.atan2(controlPoints[1].y - center.y, controlPoints[1].x - center.x) * 180 / Math.PI);
+
+ if (radiusX === radiusY) {
+ s.push("type:'" + OG.Constants.GEOM_NAME[this.TYPE] + "'");
+ s.push("center:" + center);
+ s.push("radius:" + radiusX);
+ } else {
+ s.push("type:'" + OG.Constants.GEOM_NAME[OG.Constants.GEOM_TYPE.ELLIPSE] + "'");
+ s.push("center:" + center);
+ s.push("radiusX:" + radiusX);
+ s.push("radiusY:" + radiusY);
+ s.push("angle:" + angle);
+ }
+
+ return "{" + s.join() + "}";
};
/**
* 공간 기하 객체(Spatial Geometry Object) Collection
@@ -9877,14 +9887,14 @@ OG.geometry.Circle.prototype.toString = function () {
*/
OG.geometry.GeometryCollection = function (geometries) {
- this.TYPE = OG.Constants.GEOM_TYPE.COLLECTION;
- this.style = new OG.geometry.Style();
+ this.TYPE = OG.Constants.GEOM_TYPE.COLLECTION;
+ this.style = new OG.geometry.Style();
- /**
- * 공간 기하 객체 Array
- * @type OG.geometry.Geometry[]
- */
- this.geometries = geometries;
+ /**
+ * 공간 기하 객체 Array
+ * @type OG.geometry.Geometry[]
+ */
+ this.geometries = geometries;
};
OG.geometry.GeometryCollection.prototype = new OG.geometry.Geometry();
OG.geometry.GeometryCollection.superclass = OG.geometry.Geometry;
@@ -9898,17 +9908,17 @@ OG.GeometryCollection = OG.geometry.GeometryCollection;
* @override
*/
OG.geometry.GeometryCollection.prototype.getVertices = function () {
- var vertices = [], _vertices, i, j;
- for (var i = 0,leni = this.geometries.length; i < leni; i++) {
- _vertices = this.geometries[i].getVertices();
- for (var j = 0,lenj = _vertices.length; j < lenj; j++) {
- vertices.push(_vertices[j]);
- }
- }
+ var vertices = [], _vertices, i, j;
+ for (var i = 0, leni = this.geometries.length; i < leni; i++) {
+ _vertices = this.geometries[i].getVertices();
+ for (var j = 0, lenj = _vertices.length; j < lenj; j++) {
+ vertices.push(_vertices[j]);
+ }
+ }
- return vertices;
+ return vertices;
};
-OG.geometry.GeometryCollection.prototype.getVerticess = function(){
+OG.geometry.GeometryCollection.prototype.getVerticess = function () {
};
@@ -9921,13 +9931,13 @@ OG.geometry.GeometryCollection.prototype.getVerticess = function(){
* @override
*/
OG.geometry.GeometryCollection.prototype.move = function (offsetX, offsetY) {
- this.getBoundary().move(offsetX, offsetY);
- for (var i = 0,leni = this.geometries.length; i < leni; i++) {
- this.geometries[i].move(offsetX, offsetY);
- this.geometries[i].reset();
- }
+ this.getBoundary().move(offsetX, offsetY);
+ for (var i = 0, leni = this.geometries.length; i < leni; i++) {
+ this.geometries[i].move(offsetX, offsetY);
+ this.geometries[i].reset();
+ }
- return this;
+ return this;
};
/**
@@ -9941,31 +9951,31 @@ OG.geometry.GeometryCollection.prototype.move = function (offsetX, offsetY) {
* @override
*/
OG.geometry.GeometryCollection.prototype.resize = function (upper, lower, left, right) {
- var boundary = this.getBoundary(),
- offsetX = left + right,
- offsetY = upper + lower,
- width = boundary.getWidth() + offsetX,
- height = boundary.getHeight() + offsetY,
- rateWidth = boundary.getWidth() === 0 ? 1 : width / boundary.getWidth(),
- rateHeight = boundary.getHeight() === 0 ? 1 : height / boundary.getHeight(),
- upperLeft = boundary.getUpperLeft(),
- vertices, i, j;
-
- if (width < 0 || height < 0) {
- throw new OG.ParamError();
- }
-
- for (var i = 0,leni = this.geometries.length; i < leni; i++) {
- vertices = this.geometries[i].vertices;
- for (var j = 0,lenj = vertices.length; j < lenj; j++) {
- vertices[j].x = OG.Util.round((upperLeft.x - left) + (vertices[j].x - upperLeft.x) * rateWidth);
- vertices[j].y = OG.Util.round((upperLeft.y - upper) + (vertices[j].y - upperLeft.y) * rateHeight);
- }
- this.geometries[i].reset();
- }
- boundary.resize(upper, lower, left, right);
-
- return this;
+ var boundary = this.getBoundary(),
+ offsetX = left + right,
+ offsetY = upper + lower,
+ width = boundary.getWidth() + offsetX,
+ height = boundary.getHeight() + offsetY,
+ rateWidth = boundary.getWidth() === 0 ? 1 : width / boundary.getWidth(),
+ rateHeight = boundary.getHeight() === 0 ? 1 : height / boundary.getHeight(),
+ upperLeft = boundary.getUpperLeft(),
+ vertices, i, j;
+
+ if (width < 0 || height < 0) {
+ throw new OG.ParamError();
+ }
+
+ for (var i = 0, leni = this.geometries.length; i < leni; i++) {
+ vertices = this.geometries[i].vertices;
+ for (var j = 0, lenj = vertices.length; j < lenj; j++) {
+ vertices[j].x = OG.Util.round((upperLeft.x - left) + (vertices[j].x - upperLeft.x) * rateWidth);
+ vertices[j].y = OG.Util.round((upperLeft.y - upper) + (vertices[j].y - upperLeft.y) * rateHeight);
+ }
+ this.geometries[i].reset();
+ }
+ boundary.resize(upper, lower, left, right);
+
+ return this;
};
/**
@@ -9977,13 +9987,13 @@ OG.geometry.GeometryCollection.prototype.resize = function (upper, lower, left,
* @override
*/
OG.geometry.GeometryCollection.prototype.resizeBox = function (width, height) {
- var boundary = this.getBoundary(),
- offsetWidth = OG.Util.round((width - boundary.getWidth()) / 2),
- offsetHeight = OG.Util.round((height - boundary.getHeight()) / 2);
+ var boundary = this.getBoundary(),
+ offsetWidth = OG.Util.round((width - boundary.getWidth()) / 2),
+ offsetHeight = OG.Util.round((height - boundary.getHeight()) / 2);
- this.resize(offsetHeight, offsetHeight, offsetWidth, offsetWidth);
+ this.resize(offsetHeight, offsetHeight, offsetWidth, offsetWidth);
- return this;
+ return this;
};
/**
@@ -9995,14 +10005,14 @@ OG.geometry.GeometryCollection.prototype.resizeBox = function (width, height) {
* @override
*/
OG.geometry.GeometryCollection.prototype.rotate = function (angle, origin) {
- origin = origin || this.getCentroid();
- for (var i = 0,leni = this.geometries.length; i < leni; i++) {
- this.geometries[i].rotate(angle, origin);
- this.geometries[i].reset();
- }
- this.reset();
+ origin = origin || this.getCentroid();
+ for (var i = 0, leni = this.geometries.length; i < leni; i++) {
+ this.geometries[i].rotate(angle, origin);
+ this.geometries[i].reset();
+ }
+ this.reset();
- return this;
+ return this;
};
/**
@@ -10013,15 +10023,15 @@ OG.geometry.GeometryCollection.prototype.rotate = function (angle, origin) {
* @override
*/
OG.geometry.GeometryCollection.prototype.fitToBoundary = function (envelope) {
- var boundary = this.getBoundary(),
- upper = boundary.getUpperCenter().y - envelope.getUpperCenter().y,
- lower = envelope.getLowerCenter().y - boundary.getLowerCenter().y,
- left = boundary.getLeftCenter().x - envelope.getLeftCenter().x,
- right = envelope.getRightCenter().x - boundary.getRightCenter().x;
+ var boundary = this.getBoundary(),
+ upper = boundary.getUpperCenter().y - envelope.getUpperCenter().y,
+ lower = envelope.getLowerCenter().y - boundary.getLowerCenter().y,
+ left = boundary.getLeftCenter().x - envelope.getLeftCenter().x,
+ right = envelope.getRightCenter().x - boundary.getRightCenter().x;
- this.resize(upper, lower, left, right);
+ this.resize(upper, lower, left, right);
- return this;
+ return this;
};
/**
@@ -10031,13 +10041,13 @@ OG.geometry.GeometryCollection.prototype.fitToBoundary = function (envelope) {
* @override
*/
OG.geometry.GeometryCollection.prototype.toString = function () {
- var s = [], i;
+ var s = [], i;
- for (var i = 0,leni = this.geometries.length; i < leni; i++) {
- s.push(this.geometries[i].toString());
- }
+ for (var i = 0, leni = this.geometries.length; i < leni; i++) {
+ s.push(this.geometries[i].toString());
+ }
- return "{type:'" + OG.Constants.GEOM_NAME[this.TYPE] + "',geometries:[" + s.join() + "]}";
+ return "{type:'" + OG.Constants.GEOM_NAME[this.TYPE] + "',geometries:[" + s.join() + "]}";
};
/**
* Line 공간 기하 객체(Spatial Geometry Object)
@@ -10057,16 +10067,16 @@ OG.geometry.GeometryCollection.prototype.toString = function () {
*/
OG.geometry.Line = function (from, to, poi) {
- var _from = this.convertCoordinate(from),
- _to = this.convertCoordinate(to);
+ var _from = this.convertCoordinate(from),
+ _to = this.convertCoordinate(to);
- OG.geometry.Line.superclass.call(this, [
- [_from.x, _from.y],
- [_to.x, _to.y]
- ], poi);
+ OG.geometry.Line.superclass.call(this, [
+ [_from.x, _from.y],
+ [_to.x, _to.y]
+ ], poi);
- this.TYPE = OG.Constants.GEOM_TYPE.LINE;
- this.style = new OG.geometry.Style();
+ this.TYPE = OG.Constants.GEOM_TYPE.LINE;
+ this.style = new OG.geometry.Style();
};
OG.geometry.Line.prototype = new OG.geometry.PolyLine();
OG.geometry.Line.superclass = OG.geometry.PolyLine;
@@ -10081,12 +10091,12 @@ OG.Line = OG.geometry.Line;
* @override
*/
OG.geometry.Line.prototype.toString = function () {
- var s = [];
- s.push("type:'" + OG.Constants.GEOM_NAME[this.TYPE] + "'");
- s.push("from:" + this.vertices[0]);
- s.push("to:" + this.vertices[1]);
+ var s = [];
+ s.push("type:'" + OG.Constants.GEOM_NAME[this.TYPE] + "'");
+ s.push("from:" + this.vertices[0]);
+ s.push("to:" + this.vertices[1]);
- return "{" + s.join() + "}";
+ return "{" + s.join() + "}";
};
/**
* Point 공간 기하 객체(Spatial Geometry Object)
@@ -10105,20 +10115,20 @@ OG.geometry.Line.prototype.toString = function () {
*/
OG.geometry.Point = function (coordinate) {
- this.TYPE = OG.Constants.GEOM_TYPE.POINT;
- this.style = new OG.geometry.Style();
+ this.TYPE = OG.Constants.GEOM_TYPE.POINT;
+ this.style = new OG.geometry.Style();
- /**
- * 좌표값
- * @type OG.geometry.Coordinate
- */
- this.coordinate = this.convertCoordinate(coordinate);
+ /**
+ * 좌표값
+ * @type OG.geometry.Coordinate
+ */
+ this.coordinate = this.convertCoordinate(coordinate);
- /**
- * Line Vertex 좌표 Array
- * @type OG.geometry.Coordinate[]
- */
- this.vertices = [this.coordinate];
+ /**
+ * Line Vertex 좌표 Array
+ * @type OG.geometry.Coordinate[]
+ */
+ this.vertices = [this.coordinate];
};
OG.geometry.Point.prototype = new OG.geometry.Geometry();
OG.geometry.Point.superclass = OG.geometry.Geometry;
@@ -10132,7 +10142,7 @@ OG.Point = OG.geometry.Point;
* @override
*/
OG.geometry.Point.prototype.getVertices = function () {
- return this.vertices;
+ return this.vertices;
};
/**
@@ -10144,11 +10154,11 @@ OG.geometry.Point.prototype.getVertices = function () {
* @override
*/
OG.geometry.Point.prototype.move = function (offsetX, offsetY) {
- this.getBoundary().move(offsetX, offsetY);
- this.coordinate.move(offsetX, offsetY);
- this.vertices = [this.coordinate];
+ this.getBoundary().move(offsetX, offsetY);
+ this.coordinate.move(offsetX, offsetY);
+ this.vertices = [this.coordinate];
- return this;
+ return this;
};
/**
@@ -10158,9 +10168,9 @@ OG.geometry.Point.prototype.move = function (offsetX, offsetY) {
* @override
*/
OG.geometry.Point.prototype.moveCentroid = function (target) {
- this.getBoundary().setUpperLeft(target);
- this.coordinate = new OG.geometry.Coordinate(target);
- this.vertices = [this.coordinate];
+ this.getBoundary().setUpperLeft(target);
+ this.coordinate = new OG.geometry.Coordinate(target);
+ this.vertices = [this.coordinate];
};
/**
@@ -10174,14 +10184,14 @@ OG.geometry.Point.prototype.moveCentroid = function (target) {
* @override
*/
OG.geometry.Point.prototype.resize = function (upper, lower, left, right) {
- var boundary = this.getBoundary();
- boundary.resize(upper, lower, left, right);
+ var boundary = this.getBoundary();
+ boundary.resize(upper, lower, left, right);
- this.coordinate = boundary.getCentroid();
- this.vertices = [this.coordinate];
- this.boundary = new OG.Envelope(this.coordinate, 0, 0);
+ this.coordinate = boundary.getCentroid();
+ this.vertices = [this.coordinate];
+ this.boundary = new OG.Envelope(this.coordinate, 0, 0);
- return this;
+ return this;
};
/**
@@ -10193,7 +10203,7 @@ OG.geometry.Point.prototype.resize = function (upper, lower, left, right) {
* @override
*/
OG.geometry.Point.prototype.resizeBox = function (width, height) {
- return this;
+ return this;
};
/**
@@ -10205,13 +10215,13 @@ OG.geometry.Point.prototype.resizeBox = function (width, height) {
* @override
*/
OG.geometry.Point.prototype.rotate = function (angle, origin) {
- origin = origin || this.getCentroid();
+ origin = origin || this.getCentroid();
- this.coordinate.rotate(angle, origin);
- this.vertices = [this.coordinate];
- this.reset();
+ this.coordinate.rotate(angle, origin);
+ this.vertices = [this.coordinate];
+ this.reset();
- return this;
+ return this;
};
/**
@@ -10222,11 +10232,11 @@ OG.geometry.Point.prototype.rotate = function (angle, origin) {
* @override
*/
OG.geometry.Point.prototype.fitToBoundary = function (envelope) {
- this.coordinate = envelope.getCentroid();
- this.vertices = [this.coordinate];
- this.boundary = new OG.Envelope(this.coordinate, 0, 0);
+ this.coordinate = envelope.getCentroid();
+ this.vertices = [this.coordinate];
+ this.boundary = new OG.Envelope(this.coordinate, 0, 0);
- return this;
+ return this;
};
/**
@@ -10236,11 +10246,11 @@ OG.geometry.Point.prototype.fitToBoundary = function (envelope) {
* @override
*/
OG.geometry.Point.prototype.toString = function () {
- var s = [];
- s.push("type:'" + OG.Constants.GEOM_NAME[this.TYPE] + "'");
- s.push("coordinate:" + this.coordinate);
+ var s = [];
+ s.push("type:'" + OG.Constants.GEOM_NAME[this.TYPE] + "'");
+ s.push("coordinate:" + this.coordinate);
- return "{" + s.join() + "}";
+ return "{" + s.join() + "}";
};
/**
* Polygon 공간 기하 객체(Spatial Geometry Object)
@@ -10259,16 +10269,16 @@ OG.geometry.Point.prototype.toString = function () {
*/
OG.geometry.Polygon = function (vertices) {
- OG.geometry.Polygon.superclass.call(this, vertices);
+ OG.geometry.Polygon.superclass.call(this, vertices);
- // Polygon 은 첫번째 좌표와 마지막 좌표가 같음
- if (this.vertices.length > 0 && !this.vertices[0].isEquals(this.vertices[this.vertices.length - 1])) {
- this.vertices.push(new OG.geometry.Coordinate(this.vertices[0].x, this.vertices[0].y));
- }
+ // Polygon 은 첫번째 좌표와 마지막 좌표가 같음
+ if (this.vertices.length > 0 && !this.vertices[0].isEquals(this.vertices[this.vertices.length - 1])) {
+ this.vertices.push(new OG.geometry.Coordinate(this.vertices[0].x, this.vertices[0].y));
+ }
- this.TYPE = OG.Constants.GEOM_TYPE.POLYGON;
- this.IS_CLOSED = true;
- this.style = new OG.geometry.Style();
+ this.TYPE = OG.Constants.GEOM_TYPE.POLYGON;
+ this.IS_CLOSED = true;
+ this.style = new OG.geometry.Style();
};
OG.geometry.Polygon.prototype = new OG.geometry.PolyLine();
OG.geometry.Polygon.superclass = OG.geometry.PolyLine;
@@ -10293,24 +10303,24 @@ OG.Polygon = OG.geometry.Polygon;
*/
OG.geometry.Rectangle = function (upperLeft, width, height) {
- var _upperLeft = this.convertCoordinate(upperLeft),
- _lowerRight = this.convertCoordinate([_upperLeft.x + width, _upperLeft.y + height]);
+ var _upperLeft = this.convertCoordinate(upperLeft),
+ _lowerRight = this.convertCoordinate([_upperLeft.x + width, _upperLeft.y + height]);
- // 파라미터 유효성 체크
- if (_upperLeft.x > _lowerRight.x || _upperLeft.y > _lowerRight.y) {
- throw new OG.ParamError();
- }
+ // 파라미터 유효성 체크
+ if (_upperLeft.x > _lowerRight.x || _upperLeft.y > _lowerRight.y) {
+ throw new OG.ParamError();
+ }
- OG.geometry.Rectangle.superclass.call(this, [
- [_upperLeft.x, _upperLeft.y],
- [_upperLeft.x + (_lowerRight.x - _upperLeft.x), _upperLeft.y],
- [_lowerRight.x, _lowerRight.y],
- [_upperLeft.x, _upperLeft.y + (_lowerRight.y - _upperLeft.y)],
- [_upperLeft.x, _upperLeft.y]
- ]);
+ OG.geometry.Rectangle.superclass.call(this, [
+ [_upperLeft.x, _upperLeft.y],
+ [_upperLeft.x + (_lowerRight.x - _upperLeft.x), _upperLeft.y],
+ [_lowerRight.x, _lowerRight.y],
+ [_upperLeft.x, _upperLeft.y + (_lowerRight.y - _upperLeft.y)],
+ [_upperLeft.x, _upperLeft.y]
+ ]);
- this.TYPE = OG.Constants.GEOM_TYPE.RECTANGLE;
- this.style = new OG.geometry.Style();
+ this.TYPE = OG.Constants.GEOM_TYPE.RECTANGLE;
+ this.style = new OG.geometry.Style();
};
OG.geometry.Rectangle.prototype = new OG.geometry.Polygon();
OG.geometry.Rectangle.superclass = OG.geometry.Polygon;
@@ -10324,17 +10334,17 @@ OG.Rectangle = OG.geometry.Rectangle;
* @override
*/
OG.geometry.Rectangle.prototype.toString = function () {
- var s = [],
- angle = OG.Util.round(Math.atan2(this.vertices[1].y - this.vertices[0].y,
- this.vertices[1].x - this.vertices[0].x) * 180 / Math.PI);
+ var s = [],
+ angle = OG.Util.round(Math.atan2(this.vertices[1].y - this.vertices[0].y,
+ this.vertices[1].x - this.vertices[0].x) * 180 / Math.PI);
- s.push("type:'" + OG.Constants.GEOM_NAME[this.TYPE] + "'");
- s.push("upperLeft:" + this.vertices[0]);
- s.push("width:" + (this.vertices[0].distance(this.vertices[1])));
- s.push("height:" + (this.vertices[0].distance(this.vertices[3])));
- s.push("angle:" + angle);
+ s.push("type:'" + OG.Constants.GEOM_NAME[this.TYPE] + "'");
+ s.push("upperLeft:" + this.vertices[0]);
+ s.push("width:" + (this.vertices[0].distance(this.vertices[1])));
+ s.push("height:" + (this.vertices[0].distance(this.vertices[3])));
+ s.push("angle:" + angle);
- return "{" + s.join() + "}";
+ return "{" + s.join() + "}";
};
/**
* 도형 Path 의 Marker 정보 최상위 인터페이스
@@ -10347,29 +10357,29 @@ OG.geometry.Rectangle.prototype.toString = function () {
*/
OG.marker.IMarker = function () {
- /**
- * marker 을 구분하는 marker ID(marker 클래스명과 일치)
- * @type String
- */
- this.MARKER_ID = null;
+ /**
+ * marker 을 구분하는 marker ID(marker 클래스명과 일치)
+ * @type String
+ */
+ this.MARKER_ID = null;
- /**
- * marker 모양을 나타내는 공간기하객체(Geometry)
- * @type OG.geometry.Geometry
- */
- this.geom = null;
+ /**
+ * marker 모양을 나타내는 공간기하객체(Geometry)
+ * @type OG.geometry.Geometry
+ */
+ this.geom = null;
};
OG.marker.IMarker.prototype = {
- /**
- * 드로잉할 marker 를 생성하여 반환한다.
- * @return {*} Marker 정보
- * @abstract
- */
- createMarker: function () {
- throw new OG.NotImplementedException("OG.shape.IMarker.createMarker");
- }
+ /**
+ * 드로잉할 marker 를 생성하여 반환한다.
+ * @return {*} Marker 정보
+ * @abstract
+ */
+ createMarker: function () {
+ throw new OG.NotImplementedException("OG.shape.IMarker.createMarker");
+ }
};
OG.marker.IMarker.prototype.constructor = OG.marker.IMarker;
OG.IMarker = OG.marker.IMarker;
@@ -10384,9 +10394,9 @@ OG.IMarker = OG.marker.IMarker;
* @author Seungpil Park
*/
OG.marker.ArrowMarker = function () {
- OG.marker.ArrowMarker.superclass.call(this);
+ OG.marker.ArrowMarker.superclass.call(this);
- this.MARKER_ID = 'OG.marker.ArrowMarker';
+ this.MARKER_ID = 'OG.marker.ArrowMarker';
};
OG.marker.ArrowMarker.prototype = new OG.marker.IMarker();
OG.marker.ArrowMarker.superclass = OG.marker.IMarker;
@@ -10400,17 +10410,17 @@ OG.ArrowMarker = OG.marker.ArrowMarker;
* @override
*/
OG.marker.ArrowMarker.prototype.createMarker = function () {
- if (this.geom) {
- return this.geom;
- }
+ if (this.geom) {
+ return this.geom;
+ }
- //this.geom = new OG.geometry.Rectangle([0, 0], 100, 100);
- this.geom = new OG.geometry.Polygon([[0, 0], [30, 20], [0, 40], [0, 0]]);
- this.geom.style = new OG.geometry.Style({
- 'fill-opacity': 1,
- 'fill': 'black'
- });
- return this.geom;
+ //this.geom = new OG.geometry.Rectangle([0, 0], 100, 100);
+ this.geom = new OG.geometry.Polygon([[0, 0], [30, 20], [0, 40], [0, 0]]);
+ this.geom.style = new OG.geometry.Style({
+ 'fill-opacity': 1,
+ 'fill': 'black'
+ });
+ return this.geom;
};
/**
* Circle Marker
@@ -10423,9 +10433,9 @@ OG.marker.ArrowMarker.prototype.createMarker = function () {
* @author Seungpil Park
*/
OG.marker.CircleMarker = function () {
- OG.marker.CircleMarker.superclass.call(this);
+ OG.marker.CircleMarker.superclass.call(this);
- this.MARKER_ID = 'OG.marker.CircleMarker';
+ this.MARKER_ID = 'OG.marker.CircleMarker';
};
OG.marker.CircleMarker.prototype = new OG.marker.IMarker();
OG.marker.CircleMarker.superclass = OG.marker.IMarker;
@@ -10439,12 +10449,12 @@ OG.CircleMarker = OG.marker.CircleMarker;
* @override
*/
OG.marker.CircleMarker.prototype.createMarker = function () {
- if (this.geom) {
- return this.geom;
- }
+ if (this.geom) {
+ return this.geom;
+ }
- this.geom = new OG.geometry.Circle([50, 50], 50);
- return this.geom;
+ this.geom = new OG.geometry.Circle([50, 50], 50);
+ return this.geom;
};
/**
* Rectangle Maker
@@ -10457,9 +10467,9 @@ OG.marker.CircleMarker.prototype.createMarker = function () {
* @author Seungpil Park
*/
OG.marker.RectangleMarker = function () {
- OG.marker.RectangleMarker.superclass.call(this);
+ OG.marker.RectangleMarker.superclass.call(this);
- this.MARKER_ID = 'OG.marker.RectangleMarker';
+ this.MARKER_ID = 'OG.marker.RectangleMarker';
};
OG.marker.RectangleMarker.prototype = new OG.marker.IMarker();
OG.marker.RectangleMarker.superclass = OG.marker.IMarker;
@@ -10473,36 +10483,36 @@ OG.RectangleMarker = OG.marker.RectangleMarker;
* @override
*/
OG.marker.RectangleMarker.prototype.createMarker = function () {
- var geom1, geom2, geomCollection = [];
- if (this.geom) {
- return this.geom;
- }
+ var geom1, geom2, geomCollection = [];
+ if (this.geom) {
+ return this.geom;
+ }
- geom1 = new OG.geometry.Circle([50, 50], 50);
- geom1.style = new OG.geometry.Style({
- "stroke-width": 4
- });
+ geom1 = new OG.geometry.Circle([50, 50], 50);
+ geom1.style = new OG.geometry.Style({
+ "stroke-width": 4
+ });
- geom2 = new OG.geometry.Polygon([
- [20, 75],
- [40, 30],
- [60, 60],
- [80, 20],
- [60, 75],
- [40, 50]
+ geom2 = new OG.geometry.Polygon([
+ [20, 75],
+ [40, 30],
+ [60, 60],
+ [80, 20],
+ [60, 75],
+ [40, 50]
- ]);
- geom2.style = new OG.geometry.Style({
- "fill": "black",
- "fill-opacity": 1
- });
+ ]);
+ geom2.style = new OG.geometry.Style({
+ "fill": "black",
+ "fill-opacity": 1
+ });
- geomCollection.push(geom1);
- geomCollection.push(geom2);
+ geomCollection.push(geom1);
+ geomCollection.push(geom2);
- this.geom = new OG.geometry.GeometryCollection(geomCollection);
+ this.geom = new OG.geometry.GeometryCollection(geomCollection);
- return this.geom;
+ return this.geom;
};
/**
* Rectangle Maker
@@ -10515,9 +10525,9 @@ OG.marker.RectangleMarker.prototype.createMarker = function () {
* @author Seungpil Park
*/
OG.marker.SwitchLMarker = function () {
- OG.marker.SwitchLMarker.superclass.call(this);
+ OG.marker.SwitchLMarker.superclass.call(this);
- this.MARKER_ID = 'OG.marker.SwitchLMarker';
+ this.MARKER_ID = 'OG.marker.SwitchLMarker';
};
OG.marker.SwitchLMarker.prototype = new OG.marker.IMarker();
OG.marker.SwitchLMarker.superclass = OG.marker.IMarker;
@@ -10531,15 +10541,15 @@ OG.SwitchLMarker = OG.marker.SwitchLMarker;
* @override
*/
OG.marker.SwitchLMarker.prototype.createMarker = function () {
- if (this.geom) {
- return this.geom;
- }
+ if (this.geom) {
+ return this.geom;
+ }
- this.geom = new OG.geometry.PolyLine([[0, 0], [20, 5]]);
- this.geom.style = new OG.geometry.Style({
- 'fill-opacity': 1
- });
- return this.geom;
+ this.geom = new OG.geometry.PolyLine([[0, 0], [20, 5]]);
+ this.geom.style = new OG.geometry.Style({
+ 'fill-opacity': 1
+ });
+ return this.geom;
};
/**
* Rectangle Maker
@@ -10552,9 +10562,9 @@ OG.marker.SwitchLMarker.prototype.createMarker = function () {
* @author Seungpil Park
*/
OG.marker.SwitchRMarker = function () {
- OG.marker.SwitchRMarker.superclass.call(this);
+ OG.marker.SwitchRMarker.superclass.call(this);
- this.MARKER_ID = 'OG.marker.SwitchRMarker';
+ this.MARKER_ID = 'OG.marker.SwitchRMarker';
};
OG.marker.SwitchRMarker.prototype = new OG.marker.IMarker();
OG.marker.SwitchRMarker.superclass = OG.marker.IMarker;
@@ -10568,15 +10578,15 @@ OG.SwitchRMarker = OG.marker.SwitchRMarker;
* @override
*/
OG.marker.SwitchRMarker.prototype.createMarker = function () {
- if (this.geom) {
- return this.geom;
- }
+ if (this.geom) {
+ return this.geom;
+ }
- this.geom = new OG.geometry.PolyLine([[0, 5], [20, 0]]);
- this.geom.style = new OG.geometry.Style({
- 'fill-opacity': 1
- });
- return this.geom;
+ this.geom = new OG.geometry.PolyLine([[0, 5], [20, 0]]);
+ this.geom.style = new OG.geometry.Style({
+ 'fill-opacity': 1
+ });
+ return this.geom;
};
/**
* Rectangle Maker
@@ -10589,9 +10599,9 @@ OG.marker.SwitchRMarker.prototype.createMarker = function () {
* @author Seungpil Park
*/
OG.marker.SwitchXMarker = function () {
- OG.marker.SwitchXMarker.superclass.call(this);
+ OG.marker.SwitchXMarker.superclass.call(this);
- this.MARKER_ID = 'OG.marker.SwitchXMarker';
+ this.MARKER_ID = 'OG.marker.SwitchXMarker';
};
OG.marker.SwitchXMarker.prototype = new OG.marker.IMarker();
OG.marker.SwitchXMarker.superclass = OG.marker.IMarker;
@@ -10605,20 +10615,20 @@ OG.SwitchXMarker = OG.marker.SwitchXMarker;
* @override
*/
OG.marker.SwitchXMarker.prototype.createMarker = function () {
- var geom1, geom2,geomCollection = [];
- if (this.geom) {
- return this.geom;
- }
+ var geom1, geom2, geomCollection = [];
+ if (this.geom) {
+ return this.geom;
+ }
- geom1 = new OG.geometry.Line([-10, 10],[10,-10]);
- geom2 = new OG.geometry.Line([-10, -10],[10,10]);
+ geom1 = new OG.geometry.Line([-10, 10], [10, -10]);
+ geom2 = new OG.geometry.Line([-10, -10], [10, 10]);
- geomCollection.push(geom1);
- geomCollection.push(geom2);
+ geomCollection.push(geom1);
+ geomCollection.push(geom2);
- this.geom = new OG.geometry.GeometryCollection(geomCollection);
+ this.geom = new OG.geometry.GeometryCollection(geomCollection);
- return this.geom;
+ return this.geom;
};
/**
* 도형 Pattern 정보 최상위 인터페이스
@@ -10631,29 +10641,29 @@ OG.marker.SwitchXMarker.prototype.createMarker = function () {
*/
OG.pattern.IPattern = function () {
- /**
- * pattern 을 구분하는 pattern ID(pattern 클래스명과 일치)
- * @type String
- */
- this.PATTERN_ID = null;
+ /**
+ * pattern 을 구분하는 pattern ID(pattern 클래스명과 일치)
+ * @type String
+ */
+ this.PATTERN_ID = null;
- /**
- * pattern 모양을 나타내는 공간기하객체(Geometry)
- * @type OG.geometry.Geometry
- */
- this.geom = null;
+ /**
+ * pattern 모양을 나타내는 공간기하객체(Geometry)
+ * @type OG.geometry.Geometry
+ */
+ this.geom = null;
};
OG.pattern.IPattern.prototype = {
- /**
- * 드로잉할 pattern 를 생성하여 반환한다.
- * @return {*} pattern 정보
- * @abstract
- */
- createPattern: function () {
- throw new OG.NotImplementedException("OG.shape.IPattern.createPattern");
- }
+ /**
+ * 드로잉할 pattern 를 생성하여 반환한다.
+ * @return {*} pattern 정보
+ * @abstract
+ */
+ createPattern: function () {
+ throw new OG.NotImplementedException("OG.shape.IPattern.createPattern");
+ }
};
OG.pattern.IPattern.prototype.constructor = OG.pattern.IPattern;
OG.IPattern = OG.pattern.IPattern;
@@ -11024,7 +11034,7 @@ OG.shape.IShape.prototype = {
* @param groupElement
* @param element
*/
- onAddedToGroup: function(groupElement, element, eventOffset){
+ onAddedToGroup: function (groupElement, element, eventOffset) {
},
onSelectShape: function () {
@@ -11047,9 +11057,9 @@ OG.IShape = OG.shape.IShape;
* @author Seungpil Park
*/
OG.shape.GeomShape = function () {
- OG.shape.GeomShape.superclass.call(this);
+ OG.shape.GeomShape.superclass.call(this);
- this.TYPE = OG.Constants.SHAPE_TYPE.GEOM;
+ this.TYPE = OG.Constants.SHAPE_TYPE.GEOM;
};
OG.shape.GeomShape.prototype = new OG.shape.IShape();
OG.shape.GeomShape.superclass = OG.shape.IShape;
@@ -11063,11 +11073,11 @@ OG.GeomShape = OG.shape.GeomShape;
* @override
*/
OG.shape.GeomShape.prototype.clone = function () {
- var shape = eval('new ' + this.SHAPE_ID + '()');
- shape.label = this.label;
- shape.setData(JSON.parse(JSON.stringify(this.getData())));
+ var shape = eval('new ' + this.SHAPE_ID + '()');
+ shape.label = this.label;
+ shape.setData(JSON.parse(JSON.stringify(this.getData())));
- return shape;
+ return shape;
};
/**
* Text Shape
@@ -11081,22 +11091,22 @@ OG.shape.GeomShape.prototype.clone = function () {
* @author Seungpil Park
*/
OG.shape.TextShape = function (text) {
- OG.shape.TextShape.superclass.call(this);
+ OG.shape.TextShape.superclass.call(this);
- this.TYPE = OG.Constants.SHAPE_TYPE.TEXT;
- this.SHAPE_ID = 'OG.shape.TextShape';
+ this.TYPE = OG.Constants.SHAPE_TYPE.TEXT;
+ this.SHAPE_ID = 'OG.shape.TextShape';
- /**
- * 드로잉할 텍스트
- * @type String
- */
- this.text = text || "Text Here";
+ /**
+ * 드로잉할 텍스트
+ * @type String
+ */
+ this.text = text || "";
- /**
- * 회전각도
- * @type Number
- */
- this.angle = 0;
+ /**
+ * 회전각도
+ * @type Number
+ */
+ this.angle = 0;
};
OG.shape.TextShape.prototype = new OG.shape.IShape();
OG.shape.TextShape.superclass = OG.shape.IShape;
@@ -11110,7 +11120,7 @@ OG.TextShape = OG.shape.TextShape;
* @override
*/
OG.shape.TextShape.prototype.createShape = function () {
- return this.text;
+ return this.text;
};
/**
@@ -11120,11 +11130,11 @@ OG.shape.TextShape.prototype.createShape = function () {
* @override
*/
OG.shape.TextShape.prototype.clone = function () {
- var shape = eval('new ' + this.SHAPE_ID + '()');
- shape.text = this.text;
- shape.angle = this.angle;
- shape.setData(JSON.parse(JSON.stringify(this.getData())));
- return shape;
+ var shape = eval('new ' + this.SHAPE_ID + '()');
+ shape.text = this.text;
+ shape.angle = this.angle;
+ shape.setData(JSON.parse(JSON.stringify(this.getData())));
+ return shape;
};
/**
* Image Shape
@@ -11139,23 +11149,23 @@ OG.shape.TextShape.prototype.clone = function () {
* @author Seungpil Park
*/
OG.shape.ImageShape = function (image, label) {
- OG.shape.ImageShape.superclass.call(this);
+ OG.shape.ImageShape.superclass.call(this);
- this.TYPE = OG.Constants.SHAPE_TYPE.IMAGE;
- this.SHAPE_ID = 'OG.shape.ImageShape';
- this.label = label;
+ this.TYPE = OG.Constants.SHAPE_TYPE.IMAGE;
+ this.SHAPE_ID = 'OG.shape.ImageShape';
+ this.label = label;
- /**
- * 드로잉할 이미지 URL
- * @type String
- */
- this.image = image;
+ /**
+ * 드로잉할 이미지 URL
+ * @type String
+ */
+ this.image = image;
- /**
- * 회전각도
- * @type Number
- */
- this.angle = 0;
+ /**
+ * 회전각도
+ * @type Number
+ */
+ this.angle = 0;
};
OG.shape.ImageShape.prototype = new OG.shape.IShape();
OG.shape.ImageShape.superclass = OG.shape.IShape;
@@ -11169,7 +11179,7 @@ OG.ImageShape = OG.shape.ImageShape;
* @override
*/
OG.shape.ImageShape.prototype.createShape = function () {
- return this.image;
+ return this.image;
};
/**
@@ -11179,12 +11189,12 @@ OG.shape.ImageShape.prototype.createShape = function () {
* @override
*/
OG.shape.ImageShape.prototype.clone = function () {
- var shape = eval('new ' + this.SHAPE_ID + '()');
- shape.image = this.image;
- shape.label = this.label;
- shape.angle = this.angle;
- shape.setData(JSON.parse(JSON.stringify(this.getData())));
- return shape;
+ var shape = eval('new ' + this.SHAPE_ID + '()');
+ shape.image = this.image;
+ shape.label = this.label;
+ shape.angle = this.angle;
+ shape.setData(JSON.parse(JSON.stringify(this.getData())));
+ return shape;
};
/**
* Edge Shape
@@ -11202,36 +11212,36 @@ OG.shape.ImageShape.prototype.clone = function () {
* @author Seungpil Park
*/
OG.shape.EdgeShape = function (from, to, label, fromLabel, toLabel) {
- OG.shape.EdgeShape.superclass.call(this);
+ OG.shape.EdgeShape.superclass.call(this);
- this.TYPE = OG.Constants.SHAPE_TYPE.EDGE;
- this.SHAPE_ID = 'OG.shape.EdgeShape';
+ this.TYPE = OG.Constants.SHAPE_TYPE.EDGE;
+ this.SHAPE_ID = 'OG.shape.EdgeShape';
- /**
- * Edge 시작 좌표
- * @type Number[]
- */
- this.from = from;
+ /**
+ * Edge 시작 좌표
+ * @type Number[]
+ */
+ this.from = from;
- /**
- * Edge 끝 좌표
- * @type Number[]
- */
- this.to = to;
+ /**
+ * Edge 끝 좌표
+ * @type Number[]
+ */
+ this.to = to;
- this.label = label;
+ this.label = label;
- /**
- * Edge 시작점 라벨
- * @type String
- */
- this.fromLabel = fromLabel;
+ /**
+ * Edge 시작점 라벨
+ * @type String
+ */
+ this.fromLabel = fromLabel;
- /**
- * Edge 끝점 라벨
- * @type String
- */
- this.toLabel = toLabel;
+ /**
+ * Edge 끝점 라벨
+ * @type String
+ */
+ this.toLabel = toLabel;
};
OG.shape.EdgeShape.prototype = new OG.shape.IShape();
OG.shape.EdgeShape.superclass = OG.shape.IShape;
@@ -11245,12 +11255,12 @@ OG.EdgeShape = OG.shape.EdgeShape;
* @override
*/
OG.shape.EdgeShape.prototype.createShape = function () {
- if (this.geom) {
- return this.geom;
- }
+ if (this.geom) {
+ return this.geom;
+ }
- this.geom = new OG.PolyLine([this.from || [0, 0], this.to || [70, 0]]);
- return this.geom;
+ this.geom = new OG.PolyLine([this.from || [0, 0], this.to || [70, 0]]);
+ return this.geom;
};
/**
@@ -11260,15 +11270,15 @@ OG.shape.EdgeShape.prototype.createShape = function () {
* @override
*/
OG.shape.EdgeShape.prototype.clone = function () {
- var shape = eval('new ' + this.SHAPE_ID + '()');
- shape.from = this.from;
- shape.to = this.to;
- shape.label = this.label;
- shape.fromLabel = this.fromLabel;
- shape.toLabel = this.toLabel;
- shape.setData(JSON.parse(JSON.stringify(this.getData())));
+ var shape = eval('new ' + this.SHAPE_ID + '()');
+ shape.from = this.from;
+ shape.to = this.to;
+ shape.label = this.label;
+ shape.fromLabel = this.fromLabel;
+ shape.toLabel = this.toLabel;
+ shape.setData(JSON.parse(JSON.stringify(this.getData())));
- return shape;
+ return shape;
};
/**
* Svg Shape
@@ -11283,23 +11293,23 @@ OG.shape.EdgeShape.prototype.clone = function () {
* @author Seungpil Park
*/
OG.shape.SvgShape = function (xml, label) {
- OG.shape.SvgShape.superclass.call(this);
+ OG.shape.SvgShape.superclass.call(this);
- this.TYPE = OG.Constants.SHAPE_TYPE.IMAGE;
- this.SHAPE_ID = 'OG.shape.SvgShape';
- this.label = label;
+ this.TYPE = OG.Constants.SHAPE_TYPE.IMAGE;
+ this.SHAPE_ID = 'OG.shape.SvgShape';
+ this.label = label;
- /**
- * 드로잉할 xml
- * @type String
- */
- this.xml = xml;
+ /**
+ * 드로잉할 xml
+ * @type String
+ */
+ this.xml = xml;
- /**
- * 회전각도
- * @type Number
- */
- this.angle = 0;
+ /**
+ * 회전각도
+ * @type Number
+ */
+ this.angle = 0;
};
OG.shape.SvgShape.prototype = new OG.shape.IShape();
OG.shape.SvgShape.superclass = OG.shape.IShape;
@@ -11313,7 +11323,7 @@ OG.SvgShape = OG.shape.SvgShape;
* @override
*/
OG.shape.SvgShape.prototype.createShape = function () {
- return this.xml;
+ return this.xml;
};
/**
@@ -11323,12 +11333,12 @@ OG.shape.SvgShape.prototype.createShape = function () {
* @override
*/
OG.shape.SvgShape.prototype.clone = function () {
- var shape = eval('new ' + this.SHAPE_ID + '()');
- shape.xml = this.xml;
- shape.label = this.label;
- shape.angle = this.angle;
- shape.setData(JSON.parse(JSON.stringify(this.getData())));
- return shape;
+ var shape = eval('new ' + this.SHAPE_ID + '()');
+ shape.xml = this.xml;
+ shape.label = this.label;
+ shape.angle = this.angle;
+ shape.setData(JSON.parse(JSON.stringify(this.getData())));
+ return shape;
};
/**
* Circle Shape
@@ -11342,10 +11352,10 @@ OG.shape.SvgShape.prototype.clone = function () {
* @author Seungpil Park
*/
OG.shape.CircleShape = function (label) {
- OG.shape.CircleShape.superclass.call(this);
+ OG.shape.CircleShape.superclass.call(this);
- this.SHAPE_ID = 'OG.shape.CircleShape';
- this.label = label;
+ this.SHAPE_ID = 'OG.shape.CircleShape';
+ this.label = label;
};
OG.shape.CircleShape.prototype = new OG.shape.GeomShape();
OG.shape.CircleShape.superclass = OG.shape.GeomShape;
@@ -11359,12 +11369,12 @@ OG.CircleShape = OG.shape.CircleShape;
* @override
*/
OG.shape.CircleShape.prototype.createShape = function () {
- if (this.geom) {
- return this.geom;
- }
+ if (this.geom) {
+ return this.geom;
+ }
- this.geom = new OG.geometry.Circle([50, 50], 50);
- return this.geom;
+ this.geom = new OG.geometry.Circle([50, 50], 50);
+ return this.geom;
};
/**
* Ellipse Shape
@@ -11378,10 +11388,10 @@ OG.shape.CircleShape.prototype.createShape = function () {
* @author Seungpil Park
*/
OG.shape.EllipseShape = function (label) {
- OG.shape.EllipseShape.superclass.call(this);
+ OG.shape.EllipseShape.superclass.call(this);
- this.SHAPE_ID = 'OG.shape.EllipseShape';
- this.label = label;
+ this.SHAPE_ID = 'OG.shape.EllipseShape';
+ this.label = label;
};
OG.shape.EllipseShape.prototype = new OG.shape.GeomShape();
OG.shape.EllipseShape.superclass = OG.shape.GeomShape;
@@ -11395,12 +11405,12 @@ OG.EllipseShape = OG.shape.EllipseShape;
* @override
*/
OG.shape.EllipseShape.prototype.createShape = function () {
- if (this.geom) {
- return this.geom;
- }
+ if (this.geom) {
+ return this.geom;
+ }
- this.geom = new OG.geometry.Ellipse([50, 50], 50, 30);
- return this.geom;
+ this.geom = new OG.geometry.Ellipse([50, 50], 50, 30);
+ return this.geom;
};
/**
* SpotShape Shape
@@ -11415,18 +11425,18 @@ OG.shape.EllipseShape.prototype.createShape = function () {
* @private
*/
OG.shape.From = function (label) {
- OG.shape.From.superclass.call(this);
-
- this.SHAPE_ID = 'OG.shape.From';
- this.label = label;
- this.MOVABLE = false;
- this.RESIZABLE = false;
- this.SELF_CONNECTABLE = false;
- this.CONNECT_CLONEABLE = false;
- this.LABEL_EDITABLE = false;
- this.DELETABLE = false;
- this.CONNECT_STYLE_CHANGE = false;
- this.ENABLE_TO = false;
+ OG.shape.From.superclass.call(this);
+
+ this.SHAPE_ID = 'OG.shape.From';
+ this.label = label;
+ this.MOVABLE = false;
+ this.RESIZABLE = false;
+ this.SELF_CONNECTABLE = false;
+ this.CONNECT_CLONEABLE = false;
+ this.LABEL_EDITABLE = false;
+ this.DELETABLE = false;
+ this.CONNECT_STYLE_CHANGE = false;
+ this.ENABLE_TO = false;
};
OG.shape.From.prototype = new OG.shape.GeomShape();
OG.shape.From.superclass = OG.shape.GeomShape;
@@ -11440,12 +11450,12 @@ OG.From = OG.shape.From;
* @override
*/
OG.shape.From.prototype.createShape = function () {
- if (this.geom) {
- return this.geom;
- }
+ if (this.geom) {
+ return this.geom;
+ }
- this.geom = new OG.geometry.Circle([10, 10], 10);
- return this.geom;
+ this.geom = new OG.geometry.Circle([10, 10], 10);
+ return this.geom;
};
/**
* Group Shape
@@ -11459,26 +11469,26 @@ OG.shape.From.prototype.createShape = function () {
* @author Seungpil Park
*/
OG.shape.GroupShape = function (label) {
- OG.shape.GroupShape.superclass.call(this);
+ OG.shape.GroupShape.superclass.call(this);
- this.TYPE = OG.Constants.SHAPE_TYPE.GROUP;
- this.SHAPE_ID = 'OG.shape.GroupShape';
- this.label = label;
+ this.TYPE = OG.Constants.SHAPE_TYPE.GROUP;
+ this.SHAPE_ID = 'OG.shape.GroupShape';
+ this.label = label;
- this.CONNECTABLE = false;
- this.SELF_CONNECTABLE = false;
+ this.CONNECTABLE = false;
+ this.SELF_CONNECTABLE = false;
- /**
- * 그룹핑 가능여부
- * @type Boolean
- */
- this.GROUP_DROPABLE = true;
+ /**
+ * 그룹핑 가능여부
+ * @type Boolean
+ */
+ this.GROUP_DROPABLE = true;
- /**
- * 최소화 가능여부
- * @type Boolean
- */
- this.GROUP_COLLAPSIBLE = false;
+ /**
+ * 최소화 가능여부
+ * @type Boolean
+ */
+ this.GROUP_COLLAPSIBLE = false;
};
OG.shape.GroupShape.prototype = new OG.shape.IShape();
OG.shape.GroupShape.superclass = OG.shape.IShape;
@@ -11486,7 +11496,7 @@ OG.shape.GroupShape.prototype.constructor = OG.shape.GroupShape;
OG.GroupShape = OG.shape.GroupShape;
OG.shape.GroupShape.prototype.layoutChild = function () {
- //NONE
+ //NONE
}
@@ -11497,18 +11507,18 @@ OG.shape.GroupShape.prototype.layoutChild = function () {
* @override
*/
OG.shape.GroupShape.prototype.createShape = function () {
- if (this.geom) {
- return this.geom;
- }
+ if (this.geom) {
+ return this.geom;
+ }
- this.geom = new OG.geometry.Rectangle([0, 0], 100, 100);
- this.geom.style = new OG.geometry.Style({
- 'fill' : '#ffffff',
- 'fill-opacity': 0,
- "stroke": 'none'
- });
+ this.geom = new OG.geometry.Rectangle([0, 0], 100, 100);
+ this.geom.style = new OG.geometry.Style({
+ 'fill': '#ffffff',
+ 'fill-opacity': 0,
+ "stroke": 'none'
+ });
- return this.geom;
+ return this.geom;
};
/**
@@ -11518,11 +11528,11 @@ OG.shape.GroupShape.prototype.createShape = function () {
* @override
*/
OG.shape.GroupShape.prototype.clone = function () {
- var shape = eval('new ' + this.SHAPE_ID + '()');
- shape.label = this.label;
- shape.setData(JSON.parse(JSON.stringify(this.getData())));
+ var shape = eval('new ' + this.SHAPE_ID + '()');
+ shape.label = this.label;
+ shape.setData(JSON.parse(JSON.stringify(this.getData())));
- return shape;
+ return shape;
};
/**
* Horizontal Swimlane Shape
@@ -11536,9 +11546,9 @@ OG.shape.GroupShape.prototype.clone = function () {
* @author Seungpil Park
*/
OG.shape.HorizontalLaneShape = function (label) {
- OG.shape.HorizontalLaneShape.superclass.call(this, label);
+ OG.shape.HorizontalLaneShape.superclass.call(this, label);
- this.SHAPE_ID = 'OG.shape.HorizontalLaneShape';
+ this.SHAPE_ID = 'OG.shape.HorizontalLaneShape';
};
OG.shape.HorizontalLaneShape.prototype = new OG.shape.GroupShape();
@@ -11553,19 +11563,19 @@ OG.HorizontalLaneShape = OG.shape.HorizontalLaneShape;
* @override
*/
OG.shape.HorizontalLaneShape.prototype.createShape = function () {
- if (this.geom) {
- return this.geom;
- }
+ if (this.geom) {
+ return this.geom;
+ }
- this.geom = new OG.geometry.Rectangle([0, 0], 100, 100);
- this.geom.style = new OG.geometry.Style({
- 'label-direction': 'vertical',
- 'vertical-align' : 'top',
- 'fill' : '#ffffff',
- 'fill-opacity': 0
- });
+ this.geom = new OG.geometry.Rectangle([0, 0], 100, 100);
+ this.geom.style = new OG.geometry.Style({
+ 'label-direction': 'vertical',
+ 'vertical-align': 'top',
+ 'fill': '#ffffff',
+ 'fill-opacity': 0
+ });
- return this.geom;
+ return this.geom;
};
/**
* Horizontal Pool Shape
@@ -11607,10 +11617,10 @@ OG.shape.HorizontalPoolShape.prototype.createShape = function () {
this.geom = new OG.geometry.Rectangle([0, 0], 100, 100);
this.geom.style = new OG.geometry.Style({
'label-direction': 'vertical',
- 'vertical-align' : 'top',
- 'fill' : '#ffffff',
+ 'vertical-align': 'top',
+ 'fill': '#ffffff',
'fill-opacity': 0,
- 'title-size' : 32
+ 'title-size': 32
});
return this.geom;
@@ -11657,23 +11667,23 @@ OG.shape.HorizontalPoolShape.prototype.createSubShape = function () {
* @author Seungpil Park
*/
OG.shape.HtmlShape = function (html, label) {
- OG.shape.HtmlShape.superclass.call(this);
+ OG.shape.HtmlShape.superclass.call(this);
- this.TYPE = OG.Constants.SHAPE_TYPE.HTML;
- this.SHAPE_ID = 'OG.shape.HtmlShape';
- this.label = label;
+ this.TYPE = OG.Constants.SHAPE_TYPE.HTML;
+ this.SHAPE_ID = 'OG.shape.HtmlShape';
+ this.label = label;
- /**
- * 드로잉할 임베드 HTML String
- * @type String
- */
- this.html = html || "";
+ /**
+ * 드로잉할 임베드 HTML String
+ * @type String
+ */
+ this.html = html || "";
- /**
- * 회전각도
- * @type Number
- */
- this.angle = 0;
+ /**
+ * 회전각도
+ * @type Number
+ */
+ this.angle = 0;
};
OG.shape.HtmlShape.prototype = new OG.shape.IShape();
OG.shape.HtmlShape.superclass = OG.shape.IShape;
@@ -11687,7 +11697,7 @@ OG.HtmlShape = OG.shape.HtmlShape;
* @override
*/
OG.shape.HtmlShape.prototype.createShape = function () {
- return this.html;
+ return this.html;
};
/**
@@ -11697,13 +11707,13 @@ OG.shape.HtmlShape.prototype.createShape = function () {
* @override
*/
OG.shape.HtmlShape.prototype.clone = function () {
- var shape = eval('new ' + this.SHAPE_ID + '()');
- shape.html = this.html;
- shape.label = this.label;
- shape.angle = this.angle;
- shape.setData(JSON.parse(JSON.stringify(this.getData())));
+ var shape = eval('new ' + this.SHAPE_ID + '()');
+ shape.html = this.html;
+ shape.label = this.label;
+ shape.angle = this.angle;
+ shape.setData(JSON.parse(JSON.stringify(this.getData())));
- return shape;
+ return shape;
};
/**
* Rectangle Shape
@@ -11717,10 +11727,10 @@ OG.shape.HtmlShape.prototype.clone = function () {
* @author Seungpil Park
*/
OG.shape.RectangleShape = function (label) {
- OG.shape.RectangleShape.superclass.call(this);
+ OG.shape.RectangleShape.superclass.call(this);
- this.SHAPE_ID = 'OG.shape.RectangleShape';
- this.label = label;
+ this.SHAPE_ID = 'OG.shape.RectangleShape';
+ this.label = label;
};
OG.shape.RectangleShape.prototype = new OG.shape.GeomShape();
OG.shape.RectangleShape.superclass = OG.shape.GeomShape;
@@ -11734,12 +11744,12 @@ OG.RectangleShape = OG.shape.RectangleShape;
* @override
*/
OG.shape.RectangleShape.prototype.createShape = function () {
- if (this.geom) {
- return this.geom;
- }
+ if (this.geom) {
+ return this.geom;
+ }
- this.geom = new OG.geometry.Rectangle([0, 0], 100, 100);
- return this.geom;
+ this.geom = new OG.geometry.Rectangle([0, 0], 100, 100);
+ return this.geom;
};
/**
* SpotShape Shape
@@ -11753,10 +11763,10 @@ OG.shape.RectangleShape.prototype.createShape = function () {
* @author Seungpil Park
*/
OG.shape.SpotShape = function (label) {
- OG.shape.SpotShape.superclass.call(this);
+ OG.shape.SpotShape.superclass.call(this);
- this.SHAPE_ID = 'OG.shape.SpotShape';
- this.label = label;
+ this.SHAPE_ID = 'OG.shape.SpotShape';
+ this.label = label;
};
OG.shape.SpotShape.prototype = new OG.shape.GeomShape();
OG.shape.SpotShape.superclass = OG.shape.GeomShape;
@@ -11770,12 +11780,12 @@ OG.SpotShape = OG.shape.SpotShape;
* @override
*/
OG.shape.SpotShape.prototype.createShape = function () {
- if (this.geom) {
- return this.geom;
- }
+ if (this.geom) {
+ return this.geom;
+ }
- this.geom = new OG.geometry.Circle([10, 10], 10);
- return this.geom;
+ this.geom = new OG.geometry.Circle([10, 10], 10);
+ return this.geom;
};
/**
* SpotShape Shape
@@ -11790,18 +11800,18 @@ OG.shape.SpotShape.prototype.createShape = function () {
* @private
*/
OG.shape.To = function (label) {
- OG.shape.To.superclass.call(this);
-
- this.SHAPE_ID = 'OG.shape.To';
- this.label = label;
- this.MOVABLE = false;
- this.RESIZABLE = false;
- this.SELF_CONNECTABLE = false;
- this.CONNECT_CLONEABLE = false;
- this.LABEL_EDITABLE = false;
- this.DELETABLE = false;
- this.CONNECT_STYLE_CHANGE = false;
- this.ENABLE_FROM = false;
+ OG.shape.To.superclass.call(this);
+
+ this.SHAPE_ID = 'OG.shape.To';
+ this.label = label;
+ this.MOVABLE = false;
+ this.RESIZABLE = false;
+ this.SELF_CONNECTABLE = false;
+ this.CONNECT_CLONEABLE = false;
+ this.LABEL_EDITABLE = false;
+ this.DELETABLE = false;
+ this.CONNECT_STYLE_CHANGE = false;
+ this.ENABLE_FROM = false;
};
OG.shape.To.prototype = new OG.shape.GeomShape();
OG.shape.To.superclass = OG.shape.GeomShape;
@@ -11815,12 +11825,12 @@ OG.To = OG.shape.To;
* @override
*/
OG.shape.To.prototype.createShape = function () {
- if (this.geom) {
- return this.geom;
- }
+ if (this.geom) {
+ return this.geom;
+ }
- this.geom = new OG.geometry.Circle([10, 10], 10);
- return this.geom;
+ this.geom = new OG.geometry.Circle([10, 10], 10);
+ return this.geom;
};
/**
* BPMN : Transformer Shape
@@ -11860,7 +11870,7 @@ OG.shape.Transformer.prototype.createShape = function () {
this.geom = new OG.geometry.Rectangle([0, 0], 100, 100);
this.geom.style = new OG.geometry.Style({
'label-direction': 'horizontal',
- 'vertical-align' : 'top',
+ 'vertical-align': 'top',
fill: '#ffffff',
'fill-opacity': 0
});
@@ -11879,9 +11889,9 @@ OG.shape.Transformer.prototype.createShape = function () {
* @author Seungpil Park
*/
OG.shape.VerticalLaneShape = function (label) {
- OG.shape.VerticalLaneShape.superclass.call(this, label);
+ OG.shape.VerticalLaneShape.superclass.call(this, label);
- this.SHAPE_ID = 'OG.shape.VerticalLaneShape';
+ this.SHAPE_ID = 'OG.shape.VerticalLaneShape';
};
OG.shape.VerticalLaneShape.prototype = new OG.shape.GroupShape();
OG.shape.VerticalLaneShape.superclass = OG.shape.GroupShape;
@@ -11895,20 +11905,20 @@ OG.VerticalLaneShape = OG.shape.VerticalLaneShape;
* @override
*/
OG.shape.VerticalLaneShape.prototype.createShape = function () {
- if (this.geom) {
- return this.geom;
- }
+ if (this.geom) {
+ return this.geom;
+ }
- this.geom = new OG.geometry.Rectangle([0, 0], 100, 100);
- this.geom.style = new OG.geometry.Style({
- 'label-direction': 'horizontal',
- 'vertical-align' : 'top',
- 'title-size' : 24,
- fill: '#ffffff',
- 'fill-opacity': 0
- });
+ this.geom = new OG.geometry.Rectangle([0, 0], 100, 100);
+ this.geom.style = new OG.geometry.Style({
+ 'label-direction': 'horizontal',
+ 'vertical-align': 'top',
+ 'title-size': 24,
+ fill: '#ffffff',
+ 'fill-opacity': 0
+ });
- return this.geom;
+ return this.geom;
};
/**
* Vertical Pool Shape
@@ -11946,7 +11956,7 @@ OG.shape.VerticalPoolShape.prototype.createShape = function () {
this.geom = new OG.geometry.Rectangle([0, 0], 100, 100);
this.geom.style = new OG.geometry.Style({
'label-direction': 'horizontal',
- 'vertical-align' : 'top',
+ 'vertical-align': 'top',
'fill': '#ffffff',
'fill-opacity': 0
});
@@ -12504,10 +12514,10 @@ OG.shape.bpmn.E_End.prototype.createSubShape = function () {
* @private
*/
OG.shape.bpmn.E_Intermediate = function (label) {
- OG.shape.bpmn.E_Intermediate.superclass.call(this);
+ OG.shape.bpmn.E_Intermediate.superclass.call(this);
- this.SHAPE_ID = 'OG.shape.bpmn.E_Intermediate';
- this.label = label;
+ this.SHAPE_ID = 'OG.shape.bpmn.E_Intermediate';
+ this.label = label;
};
OG.shape.bpmn.E_Intermediate.prototype = new OG.shape.bpmn.Event();
OG.shape.bpmn.E_Intermediate.superclass = OG.shape.bpmn.Event;
@@ -12521,20 +12531,20 @@ OG.E_Intermediate = OG.shape.bpmn.E_Intermediate;
* @override
*/
OG.shape.bpmn.E_Intermediate.prototype.createShape = function () {
- var geomCollection = [];
- if (this.geom) {
- return this.geom;
- }
+ var geomCollection = [];
+ if (this.geom) {
+ return this.geom;
+ }
- geomCollection.push(new OG.geometry.Circle([50, 50], 50));
- geomCollection.push(new OG.geometry.Circle([50, 50], 42));
+ geomCollection.push(new OG.geometry.Circle([50, 50], 50));
+ geomCollection.push(new OG.geometry.Circle([50, 50], 42));
- this.geom = new OG.geometry.GeometryCollection(geomCollection);
- this.geom.style = new OG.geometry.Style({
- 'label-position': 'bottom'
- });
+ this.geom = new OG.geometry.GeometryCollection(geomCollection);
+ this.geom.style = new OG.geometry.Style({
+ 'label-position': 'bottom'
+ });
- return this.geom;
+ return this.geom;
};
/**
* BPMN : Start Event Shape
@@ -12549,11 +12559,11 @@ OG.shape.bpmn.E_Intermediate.prototype.createShape = function () {
* @private
*/
OG.shape.bpmn.E_Start = function (label) {
- OG.shape.bpmn.E_Start.superclass.call(this);
+ OG.shape.bpmn.E_Start.superclass.call(this);
- this.SHAPE_ID = 'OG.shape.bpmn.E_Start';
- this.label = label;
- this.inclusion = false;
+ this.SHAPE_ID = 'OG.shape.bpmn.E_Start';
+ this.label = label;
+ this.inclusion = false;
};
OG.shape.bpmn.E_Start.prototype = new OG.shape.bpmn.Event();
OG.shape.bpmn.E_Start.superclass = OG.shape.bpmn.Event;
@@ -12567,34 +12577,34 @@ OG.E_Start = OG.shape.bpmn.E_Start;
* @override
*/
OG.shape.bpmn.E_Start.prototype.createShape = function () {
- if (this.geom) {
- return this.geom;
- }
+ if (this.geom) {
+ return this.geom;
+ }
- this.geom = new OG.geometry.Circle([50, 50], 50);
- this.geom.style = new OG.geometry.Style({
- 'label-position': 'bottom',
- "stroke-width" : 1.5
- });
+ this.geom = new OG.geometry.Circle([50, 50], 50);
+ this.geom.style = new OG.geometry.Style({
+ 'label-position': 'bottom',
+ "stroke-width": 1.5
+ });
- return this.geom;
+ return this.geom;
};
OG.shape.bpmn.E_Start.prototype.createSubShape = function () {
- this.sub = [];
+ this.sub = [];
- if (this.inclusion) {
- this.sub.push({
- shape: new OG.ImageShape(this.currentCanvas._CONFIG.IMAGE_BASE + 'complete.png'),
- width: '20px',
- height: '20px',
- right: '0px',
- bottom: '20px',
- style: {}
- })
- }
+ if (this.inclusion) {
+ this.sub.push({
+ shape: new OG.ImageShape(this.currentCanvas._CONFIG.IMAGE_BASE + 'complete.png'),
+ width: '20px',
+ height: '20px',
+ right: '0px',
+ bottom: '20px',
+ style: {}
+ })
+ }
- return this.sub;
+ return this.sub;
};
/**
* BPMN : Gateway Shape
@@ -12609,10 +12619,10 @@ OG.shape.bpmn.E_Start.prototype.createSubShape = function () {
* @private
*/
OG.shape.bpmn.G_Gateway = function (label) {
- OG.shape.bpmn.G_Gateway.superclass.call(this);
+ OG.shape.bpmn.G_Gateway.superclass.call(this);
- this.SHAPE_ID = 'OG.shape.bpmn.G_Gateway';
- this.label = label;
+ this.SHAPE_ID = 'OG.shape.bpmn.G_Gateway';
+ this.label = label;
};
OG.shape.bpmn.G_Gateway.prototype = new OG.shape.bpmn.Event();
OG.shape.bpmn.G_Gateway.superclass = OG.shape.bpmn.Event;
@@ -12626,69 +12636,69 @@ OG.G_Gateway = OG.shape.bpmn.G_Gateway;
* @override
*/
OG.shape.bpmn.G_Gateway.prototype.createShape = function () {
- if (this.geom) {
- return this.geom;
- }
-
- this.geom = new OG.geometry.Polygon([
- [0, 50],
- [50, 100],
- [100, 50],
- [50, 0]
- ]);
-
- return this.geom;
-};
-
-OG.shape.bpmn.G_Gateway.prototype.createContextMenu = function(){
- var me = this;
- this.contextMenu = {
- 'delete': true,
- 'copy': true,
- 'format': true,
- 'text': true,
- 'bringToFront': true,
- 'sendToBack': true,
- 'changegateway': {
- name: '변경',
- items: {
- 'G_Gateway': {
- name: '베타적',
- type: 'radio',
- radio: 'changegateway',
- value: 'OG.shape.bpmn.G_Gateway',
- events: {
- change: function (e) {
- me.currentCanvas.getEventHandler().changeShape(e.target.value);
- }
- }
- },
- 'G_Parallel': {
- name: '병렬',
- type: 'radio',
- radio: 'changegateway',
- value: 'OG.shape.bpmn.G_Parallel',
- events: {
- change: function (e) {
- me.currentCanvas.getEventHandler().changeShape(e.target.value);
- }
- }
- },
- 'G_Inclusive': {
- name: '포괄적',
- type: 'radio',
- radio: 'changegateway',
- value: 'OG.shape.bpmn.G_Inclusive',
- events: {
- change: function (e) {
- me.currentCanvas.getEventHandler().changeShape(e.target.value);
- }
- }
- }
- }
- }
- };
- return this.contextMenu;
+ if (this.geom) {
+ return this.geom;
+ }
+
+ this.geom = new OG.geometry.Polygon([
+ [0, 50],
+ [50, 100],
+ [100, 50],
+ [50, 0]
+ ]);
+
+ return this.geom;
+};
+
+OG.shape.bpmn.G_Gateway.prototype.createContextMenu = function () {
+ var me = this;
+ this.contextMenu = {
+ 'delete': true,
+ 'copy': true,
+ 'format': true,
+ 'text': true,
+ 'bringToFront': true,
+ 'sendToBack': true,
+ 'changegateway': {
+ name: '변경',
+ items: {
+ 'G_Gateway': {
+ name: '베타적',
+ type: 'radio',
+ radio: 'changegateway',
+ value: 'OG.shape.bpmn.G_Gateway',
+ events: {
+ change: function (e) {
+ me.currentCanvas.getEventHandler().changeShape(e.target.value);
+ }
+ }
+ },
+ 'G_Parallel': {
+ name: '병렬',
+ type: 'radio',
+ radio: 'changegateway',
+ value: 'OG.shape.bpmn.G_Parallel',
+ events: {
+ change: function (e) {
+ me.currentCanvas.getEventHandler().changeShape(e.target.value);
+ }
+ }
+ },
+ 'G_Inclusive': {
+ name: '포괄적',
+ type: 'radio',
+ radio: 'changegateway',
+ value: 'OG.shape.bpmn.G_Inclusive',
+ events: {
+ change: function (e) {
+ me.currentCanvas.getEventHandler().changeShape(e.target.value);
+ }
+ }
+ }
+ }
+ }
+ };
+ return this.contextMenu;
};
/**
* BPMN : Human Task Shape
@@ -13679,10 +13689,10 @@ OG.shape.bpmn.E_End_Link.prototype.createShape = function () {
* @private
*/
OG.shape.bpmn.E_End_Message = function (label) {
- OG.shape.bpmn.E_End_Message.superclass.call(this);
+ OG.shape.bpmn.E_End_Message.superclass.call(this);
- this.SHAPE_ID = 'OG.shape.bpmn.E_End_Message';
- this.label = label;
+ this.SHAPE_ID = 'OG.shape.bpmn.E_End_Message';
+ this.label = label;
};
OG.shape.bpmn.E_End_Message.prototype = new OG.shape.bpmn.Event();
OG.shape.bpmn.E_End_Message.superclass = OG.shape.bpmn.Event;
@@ -13696,50 +13706,50 @@ OG.E_End_Message = OG.shape.bpmn.E_End_Message;
* @override
*/
OG.shape.bpmn.E_End_Message.prototype.createShape = function () {
- var geom1, geom2, geom3, geomCollection = [];
- if (this.geom) {
- return this.geom;
- }
-
- geom1 = new OG.geometry.Circle([50, 50], 50);
- geom1.style = new OG.geometry.Style({
- "stroke-width": 3
- });
-
- geom2 = new OG.geometry.PolyLine([
- [20, 25],
- [50, 45],
- [80, 25],
- [20, 25]
- ]);
- geom2.style = new OG.geometry.Style({
- "fill" : "black",
- "fill-opacity": 1
- });
-
- geom3 = new OG.geometry.PolyLine([
- [20, 35],
- [20, 70],
- [80, 70],
- [80, 35],
- [50, 55],
- [20, 35]
- ]);
- geom3.style = new OG.geometry.Style({
- "fill" : "black",
- "fill-opacity": 1
- });
-
- geomCollection.push(geom1);
- geomCollection.push(geom2);
- geomCollection.push(geom3);
-
- this.geom = new OG.geometry.GeometryCollection(geomCollection);
- this.geom.style = new OG.geometry.Style({
- 'label-position': 'bottom'
- });
-
- return this.geom;
+ var geom1, geom2, geom3, geomCollection = [];
+ if (this.geom) {
+ return this.geom;
+ }
+
+ geom1 = new OG.geometry.Circle([50, 50], 50);
+ geom1.style = new OG.geometry.Style({
+ "stroke-width": 3
+ });
+
+ geom2 = new OG.geometry.PolyLine([
+ [20, 25],
+ [50, 45],
+ [80, 25],
+ [20, 25]
+ ]);
+ geom2.style = new OG.geometry.Style({
+ "fill": "black",
+ "fill-opacity": 1
+ });
+
+ geom3 = new OG.geometry.PolyLine([
+ [20, 35],
+ [20, 70],
+ [80, 70],
+ [80, 35],
+ [50, 55],
+ [20, 35]
+ ]);
+ geom3.style = new OG.geometry.Style({
+ "fill": "black",
+ "fill-opacity": 1
+ });
+
+ geomCollection.push(geom1);
+ geomCollection.push(geom2);
+ geomCollection.push(geom3);
+
+ this.geom = new OG.geometry.GeometryCollection(geomCollection);
+ this.geom.style = new OG.geometry.Style({
+ 'label-position': 'bottom'
+ });
+
+ return this.geom;
};
/**
* BPMN : Multiple End Event Shape
@@ -13754,10 +13764,10 @@ OG.shape.bpmn.E_End_Message.prototype.createShape = function () {
* @private
*/
OG.shape.bpmn.E_End_Multiple = function (label) {
- OG.shape.bpmn.E_End_Multiple.superclass.call(this);
+ OG.shape.bpmn.E_End_Multiple.superclass.call(this);
- this.SHAPE_ID = 'OG.shape.bpmn.E_End_Multiple';
- this.label = label;
+ this.SHAPE_ID = 'OG.shape.bpmn.E_End_Multiple';
+ this.label = label;
};
OG.shape.bpmn.E_End_Multiple.prototype = new OG.shape.bpmn.Event();
OG.shape.bpmn.E_End_Multiple.superclass = OG.shape.bpmn.Event;
@@ -13771,44 +13781,44 @@ OG.E_End_Multiple = OG.shape.bpmn.E_End_Multiple;
* @override
*/
OG.shape.bpmn.E_End_Multiple.prototype.createShape = function () {
- var geom1, geom2, geomCollection = [];
- if (this.geom) {
- return this.geom;
- }
-
- geom1 = new OG.geometry.Circle([50, 50], 50);
- geom1.style = new OG.geometry.Style({
- "stroke-width": 3
- });
-
- geom2 = new OG.geometry.Polygon([
- [50, 15],
- [39, 33],
- [20, 33],
- [29, 50],
- [19, 67],
- [40, 67],
- [50, 85],
- [60, 68],
- [80, 68],
- [70, 50],
- [79, 33],
- [60, 33]
- ]);
- geom2.style = new OG.geometry.Style({
- "fill" : "black",
- "fill-opacity": 1
- });
-
- geomCollection.push(geom1);
- geomCollection.push(geom2);
-
- this.geom = new OG.geometry.GeometryCollection(geomCollection);
- this.geom.style = new OG.geometry.Style({
- 'label-position': 'bottom'
- });
-
- return this.geom;
+ var geom1, geom2, geomCollection = [];
+ if (this.geom) {
+ return this.geom;
+ }
+
+ geom1 = new OG.geometry.Circle([50, 50], 50);
+ geom1.style = new OG.geometry.Style({
+ "stroke-width": 3
+ });
+
+ geom2 = new OG.geometry.Polygon([
+ [50, 15],
+ [39, 33],
+ [20, 33],
+ [29, 50],
+ [19, 67],
+ [40, 67],
+ [50, 85],
+ [60, 68],
+ [80, 68],
+ [70, 50],
+ [79, 33],
+ [60, 33]
+ ]);
+ geom2.style = new OG.geometry.Style({
+ "fill": "black",
+ "fill-opacity": 1
+ });
+
+ geomCollection.push(geom1);
+ geomCollection.push(geom2);
+
+ this.geom = new OG.geometry.GeometryCollection(geomCollection);
+ this.geom.style = new OG.geometry.Style({
+ 'label-position': 'bottom'
+ });
+
+ return this.geom;
};
/**
* BPMN : Compensation Intermediate Event Shape
@@ -13823,12 +13833,12 @@ OG.shape.bpmn.E_End_Multiple.prototype.createShape = function () {
* @private
*/
OG.shape.bpmn.E_Intermediate_Compensation = function (label) {
- OG.shape.bpmn.E_Intermediate_Compensation.superclass.call(this);
+ OG.shape.bpmn.E_Intermediate_Compensation.superclass.call(this);
- this.SHAPE_ID = 'OG.shape.bpmn.E_Intermediate_Compensation';
- this.label = label;
- this.selectable = true;
- this.movable = true;
+ this.SHAPE_ID = 'OG.shape.bpmn.E_Intermediate_Compensation';
+ this.label = label;
+ this.selectable = true;
+ this.movable = true;
};
OG.shape.bpmn.E_Intermediate_Compensation.prototype = new OG.shape.bpmn.Event();
OG.shape.bpmn.E_Intermediate_Compensation.superclass = OG.shape.bpmn.Event;
@@ -13842,38 +13852,38 @@ OG.E_Intermediate_Compensation = OG.shape.bpmn.E_Intermediate_Compensation;
* @override
*/
OG.shape.bpmn.E_Intermediate_Compensation.prototype.createShape = function () {
- var geom1, geom2, geomCollection = [];
- if (this.geom) {
- return this.geom;
- }
-
- geom1 = new OG.geometry.Polygon([
- [15, 50],
- [45, 70],
- [45, 30]
- ]);
-
- geom2 = new OG.geometry.Polygon([
- [45, 50],
- [75, 70],
- [75, 30]
- ]);
-
- geomCollection.push(new OG.geometry.Circle([50, 50], 50));
- geomCollection.push(new OG.geometry.Circle([50, 50], 40));
- geomCollection.push(geom1);
- geomCollection.push(geom2);
-
- this.geom = new OG.geometry.GeometryCollection(geomCollection);
- this.geom.style = new OG.geometry.Style({
- 'label-position': 'bottom',
- "stroke" : "#969149",
- "stroke-width" : 1.5,
- fill : "white",
- "fill-opacity" : 1
- });
-
- return this.geom;
+ var geom1, geom2, geomCollection = [];
+ if (this.geom) {
+ return this.geom;
+ }
+
+ geom1 = new OG.geometry.Polygon([
+ [15, 50],
+ [45, 70],
+ [45, 30]
+ ]);
+
+ geom2 = new OG.geometry.Polygon([
+ [45, 50],
+ [75, 70],
+ [75, 30]
+ ]);
+
+ geomCollection.push(new OG.geometry.Circle([50, 50], 50));
+ geomCollection.push(new OG.geometry.Circle([50, 50], 40));
+ geomCollection.push(geom1);
+ geomCollection.push(geom2);
+
+ this.geom = new OG.geometry.GeometryCollection(geomCollection);
+ this.geom.style = new OG.geometry.Style({
+ 'label-position': 'bottom',
+ "stroke": "#969149",
+ "stroke-width": 1.5,
+ fill: "white",
+ "fill-opacity": 1
+ });
+
+ return this.geom;
};
/**
* BPMN : Error Intermediate Event Shape
@@ -13888,10 +13898,10 @@ OG.shape.bpmn.E_Intermediate_Compensation.prototype.createShape = function () {
* @private
*/
OG.shape.bpmn.E_Intermediate_Error = function (label) {
- OG.shape.bpmn.E_Intermediate_Error.superclass.call(this);
+ OG.shape.bpmn.E_Intermediate_Error.superclass.call(this);
- this.SHAPE_ID = 'OG.shape.bpmn.E_Intermediate_Error';
- this.label = label;
+ this.SHAPE_ID = 'OG.shape.bpmn.E_Intermediate_Error';
+ this.label = label;
};
OG.shape.bpmn.E_Intermediate_Error.prototype = new OG.shape.bpmn.Event();
OG.shape.bpmn.E_Intermediate_Error.superclass = OG.shape.bpmn.Event;
@@ -13905,37 +13915,37 @@ OG.E_Intermediate_Error = OG.shape.bpmn.E_Intermediate_Error;
* @override
*/
OG.shape.bpmn.E_Intermediate_Error.prototype.createShape = function () {
- var geom1, geomCollection = [];
- if (this.geom) {
- return this.geom;
- }
-
- geom1 = new OG.geometry.Polygon([
- [20, 75],
- [40, 30],
- [60, 60],
- [80, 20],
- [60, 75],
- [40, 50]
- ]);
- geom1.style = new OG.geometry.Style({
- fill : "#ffffff"
- });
-
- geomCollection.push(new OG.geometry.Circle([50, 50], 50));
- geomCollection.push(new OG.geometry.Circle([50, 50], 42));
- geomCollection.push(geom1);
-
- this.geom = new OG.geometry.GeometryCollection(geomCollection);
- this.geom.style = new OG.geometry.Style({
- 'label-position': 'bottom',
- //"stroke" : "#969149",
- "stroke-width" : 1.5,
- fill : "white",
- "fill-opacity" : 1
- });
-
- return this.geom;
+ var geom1, geomCollection = [];
+ if (this.geom) {
+ return this.geom;
+ }
+
+ geom1 = new OG.geometry.Polygon([
+ [20, 75],
+ [40, 30],
+ [60, 60],
+ [80, 20],
+ [60, 75],
+ [40, 50]
+ ]);
+ geom1.style = new OG.geometry.Style({
+ fill: "#ffffff"
+ });
+
+ geomCollection.push(new OG.geometry.Circle([50, 50], 50));
+ geomCollection.push(new OG.geometry.Circle([50, 50], 42));
+ geomCollection.push(geom1);
+
+ this.geom = new OG.geometry.GeometryCollection(geomCollection);
+ this.geom.style = new OG.geometry.Style({
+ 'label-position': 'bottom',
+ //"stroke" : "#969149",
+ "stroke-width": 1.5,
+ fill: "white",
+ "fill-opacity": 1
+ });
+
+ return this.geom;
};
OG.shape.bpmn.E_Intermediate_Escalation = function (label) {
OG.shape.bpmn.E_Intermediate_Escalation.superclass.call(this);
@@ -13975,9 +13985,9 @@ OG.shape.bpmn.E_Intermediate_Escalation.prototype.createShape = function () {
this.geom.style = new OG.geometry.Style({
'label-position': 'bottom',
// "stroke" : "#969149",
- "stroke-width" : 1.5,
- fill : "white",
- "fill-opacity" : 1
+ "stroke-width": 1.5,
+ fill: "white",
+ "fill-opacity": 1
});
return this.geom;
@@ -13995,10 +14005,10 @@ OG.shape.bpmn.E_Intermediate_Escalation.prototype.createShape = function () {
* @private
*/
OG.shape.bpmn.E_Intermediate_Link = function (label) {
- OG.shape.bpmn.E_Intermediate_Link.superclass.call(this);
+ OG.shape.bpmn.E_Intermediate_Link.superclass.call(this);
- this.SHAPE_ID = 'OG.shape.bpmn.E_Intermediate_Link';
- this.label = label;
+ this.SHAPE_ID = 'OG.shape.bpmn.E_Intermediate_Link';
+ this.label = label;
};
OG.shape.bpmn.E_Intermediate_Link.prototype = new OG.shape.bpmn.Event();
OG.shape.bpmn.E_Intermediate_Link.superclass = OG.shape.bpmn.Event;
@@ -14013,19 +14023,19 @@ OG.E_Intermediate_Link = OG.shape.bpmn.E_Intermediate_Link;
*/
OG.shape.bpmn.E_Intermediate_Link.prototype.createShape = function () {
- if (this.geom) {
- return this.geom;
- }
- this.geom = new OG.geometry.Polygon([
- [0, 0],
- [80, 0],
- [100, 50],
- [80, 100],
- [0, 100],
- [20, 50]
- ]);
+ if (this.geom) {
+ return this.geom;
+ }
+ this.geom = new OG.geometry.Polygon([
+ [0, 0],
+ [80, 0],
+ [100, 50],
+ [80, 100],
+ [0, 100],
+ [20, 50]
+ ]);
- return this.geom;
+ return this.geom;
};
/**
* BPMN : Message Intermediate Event Shape
@@ -14040,10 +14050,10 @@ OG.shape.bpmn.E_Intermediate_Link.prototype.createShape = function () {
* @private
*/
OG.shape.bpmn.E_Intermediate_Message = function (label) {
- OG.shape.bpmn.E_Intermediate_Message.superclass.call(this);
+ OG.shape.bpmn.E_Intermediate_Message.superclass.call(this);
- this.SHAPE_ID = 'OG.shape.bpmn.E_Intermediate_Message';
- this.label = label;
+ this.SHAPE_ID = 'OG.shape.bpmn.E_Intermediate_Message';
+ this.label = label;
};
OG.shape.bpmn.E_Intermediate_Message.prototype = new OG.shape.bpmn.Event();
OG.shape.bpmn.E_Intermediate_Message.superclass = OG.shape.bpmn.Event;
@@ -14057,43 +14067,43 @@ OG.E_Intermediate_Message = OG.shape.bpmn.E_Intermediate_Message;
* @override
*/
OG.shape.bpmn.E_Intermediate_Message.prototype.createShape = function () {
- var geom1, geom2, geomCollection = [];
- if (this.geom) {
- return this.geom;
- }
-
- geom1 = new OG.geometry.PolyLine([
- [20, 25],
- [50, 45],
- [80, 25],
- [20, 25]
- ]);
-
- geom2 = new OG.geometry.PolyLine([
- [20, 35],
- [20, 70],
- [80, 70],
- [80, 35],
- [50, 55],
- [20, 35]
- ]);
-
-
- geomCollection.push(new OG.geometry.Circle([50, 50], 50));
- geomCollection.push(new OG.geometry.Circle([50, 50], 45));
- geomCollection.push(geom1);
- geomCollection.push(geom2);
-
- this.geom = new OG.geometry.GeometryCollection(geomCollection);
- this.geom.style = new OG.geometry.Style({
- 'label-position': 'bottom',
- "stroke" : "black",
- "stroke-width" : 1,
- fill : "white",
- "fill-opacity" : 1
- });
-
- return this.geom;
+ var geom1, geom2, geomCollection = [];
+ if (this.geom) {
+ return this.geom;
+ }
+
+ geom1 = new OG.geometry.PolyLine([
+ [20, 25],
+ [50, 45],
+ [80, 25],
+ [20, 25]
+ ]);
+
+ geom2 = new OG.geometry.PolyLine([
+ [20, 35],
+ [20, 70],
+ [80, 70],
+ [80, 35],
+ [50, 55],
+ [20, 35]
+ ]);
+
+
+ geomCollection.push(new OG.geometry.Circle([50, 50], 50));
+ geomCollection.push(new OG.geometry.Circle([50, 50], 45));
+ geomCollection.push(geom1);
+ geomCollection.push(geom2);
+
+ this.geom = new OG.geometry.GeometryCollection(geomCollection);
+ this.geom.style = new OG.geometry.Style({
+ 'label-position': 'bottom',
+ "stroke": "black",
+ "stroke-width": 1,
+ fill: "white",
+ "fill-opacity": 1
+ });
+
+ return this.geom;
};
OG.shape.bpmn.E_Intermediate_MessageFill = function (label) {
OG.shape.bpmn.E_Intermediate_MessageFill.superclass.call(this);
@@ -14125,7 +14135,7 @@ OG.shape.bpmn.E_Intermediate_MessageFill.prototype.createShape = function () {
[20, 25]
]);
geom1.style = new OG.geometry.Style({
- "fill" : "black",
+ "fill": "black",
"fill-opacity": 1
});
@@ -14138,7 +14148,7 @@ OG.shape.bpmn.E_Intermediate_MessageFill.prototype.createShape = function () {
[20, 35]
]);
geom2.style = new OG.geometry.Style({
- "fill" : "black",
+ "fill": "black",
"fill-opacity": 1
});
@@ -14151,10 +14161,10 @@ OG.shape.bpmn.E_Intermediate_MessageFill.prototype.createShape = function () {
this.geom = new OG.geometry.GeometryCollection(geomCollection);
this.geom.style = new OG.geometry.Style({
'label-position': 'bottom',
- "stroke" : "black",
- "stroke-width" : 1,
- fill : "white",
- "fill-opacity" : 1
+ "stroke": "black",
+ "stroke-width": 1,
+ fill: "white",
+ "fill-opacity": 1
});
return this.geom;
@@ -14172,10 +14182,10 @@ OG.shape.bpmn.E_Intermediate_MessageFill.prototype.createShape = function () {
* @private
*/
OG.shape.bpmn.E_Intermediate_Multiple = function (label) {
- OG.shape.bpmn.E_Intermediate_Multiple.superclass.call(this);
+ OG.shape.bpmn.E_Intermediate_Multiple.superclass.call(this);
- this.SHAPE_ID = 'OG.shape.bpmn.E_Intermediate_Multiple';
- this.label = label;
+ this.SHAPE_ID = 'OG.shape.bpmn.E_Intermediate_Multiple';
+ this.label = label;
};
OG.shape.bpmn.E_Intermediate_Multiple.prototype = new OG.shape.bpmn.Event();
OG.shape.bpmn.E_Intermediate_Multiple.superclass = OG.shape.bpmn.Event;
@@ -14189,33 +14199,33 @@ OG.E_Intermediate_Multiple = OG.shape.bpmn.E_Intermediate_Multiple;
* @override
*/
OG.shape.bpmn.E_Intermediate_Multiple.prototype.createShape = function () {
- var geom1, geomCollection = [];
- if (this.geom) {
- return this.geom;
- }
-
- geom1 = new OG.geometry.Polygon([
- [20, 50],
- [50, 20],
- [80, 50],
- [65, 75],
- [35, 75]
- ]);
-
- geomCollection.push(new OG.geometry.Circle([50, 50], 50));
- geomCollection.push(new OG.geometry.Circle([50, 50], 40));
- geomCollection.push(geom1);
-
- this.geom = new OG.geometry.GeometryCollection(geomCollection);
- this.geom.style = new OG.geometry.Style({
- 'label-position': 'bottom',
- "stroke" : "#969149",
- "stroke-width" : 1.5,
- fill : "white",
- "fill-opacity" : 1
- });
-
- return this.geom;
+ var geom1, geomCollection = [];
+ if (this.geom) {
+ return this.geom;
+ }
+
+ geom1 = new OG.geometry.Polygon([
+ [20, 50],
+ [50, 20],
+ [80, 50],
+ [65, 75],
+ [35, 75]
+ ]);
+
+ geomCollection.push(new OG.geometry.Circle([50, 50], 50));
+ geomCollection.push(new OG.geometry.Circle([50, 50], 40));
+ geomCollection.push(geom1);
+
+ this.geom = new OG.geometry.GeometryCollection(geomCollection);
+ this.geom.style = new OG.geometry.Style({
+ 'label-position': 'bottom',
+ "stroke": "#969149",
+ "stroke-width": 1.5,
+ fill: "white",
+ "fill-opacity": 1
+ });
+
+ return this.geom;
};
/**
* BPMN : Rule Intermediate Event Shape
@@ -14230,10 +14240,10 @@ OG.shape.bpmn.E_Intermediate_Multiple.prototype.createShape = function () {
* @private
*/
OG.shape.bpmn.E_Intermediate_Rule = function (label) {
- OG.shape.bpmn.E_Intermediate_Rule.superclass.call(this);
+ OG.shape.bpmn.E_Intermediate_Rule.superclass.call(this);
- this.SHAPE_ID = 'OG.shape.bpmn.E_Intermediate_Rule';
- this.label = label;
+ this.SHAPE_ID = 'OG.shape.bpmn.E_Intermediate_Rule';
+ this.label = label;
};
OG.shape.bpmn.E_Intermediate_Rule.prototype = new OG.shape.bpmn.Event();
OG.shape.bpmn.E_Intermediate_Rule.superclass = OG.shape.bpmn.Event;
@@ -14247,31 +14257,31 @@ OG.E_Intermediate_Rule = OG.shape.bpmn.E_Intermediate_Rule;
* @override
*/
OG.shape.bpmn.E_Intermediate_Rule.prototype.createShape = function () {
- var geom1, geomCollection = [];
- if (this.geom) {
- return this.geom;
- }
+ var geom1, geomCollection = [];
+ if (this.geom) {
+ return this.geom;
+ }
- geom1 = new OG.geometry.Rectangle([25, 20], 50, 60);
+ geom1 = new OG.geometry.Rectangle([25, 20], 50, 60);
- geomCollection.push(new OG.geometry.Circle([50, 50], 50));
- geomCollection.push(new OG.geometry.Circle([50, 50], 42));
- geomCollection.push(geom1);
- geomCollection.push(new OG.geometry.Line([30, 30], [70, 30]));
- geomCollection.push(new OG.geometry.Line([30, 45], [70, 45]));
- geomCollection.push(new OG.geometry.Line([30, 60], [70, 60]));
- geomCollection.push(new OG.geometry.Line([30, 70], [70, 70]));
+ geomCollection.push(new OG.geometry.Circle([50, 50], 50));
+ geomCollection.push(new OG.geometry.Circle([50, 50], 42));
+ geomCollection.push(geom1);
+ geomCollection.push(new OG.geometry.Line([30, 30], [70, 30]));
+ geomCollection.push(new OG.geometry.Line([30, 45], [70, 45]));
+ geomCollection.push(new OG.geometry.Line([30, 60], [70, 60]));
+ geomCollection.push(new OG.geometry.Line([30, 70], [70, 70]));
- this.geom = new OG.geometry.GeometryCollection(geomCollection);
- this.geom.style = new OG.geometry.Style({
- 'label-position': 'bottom',
- "stroke" : "black",
- "stroke-width" : 1.5,
- fill : "white",
- "fill-opacity" : 1
- });
+ this.geom = new OG.geometry.GeometryCollection(geomCollection);
+ this.geom.style = new OG.geometry.Style({
+ 'label-position': 'bottom',
+ "stroke": "black",
+ "stroke-width": 1.5,
+ fill: "white",
+ "fill-opacity": 1
+ });
- return this.geom;
+ return this.geom;
};
/**
* BPMN : Timer Intermediate Event Shape
@@ -14286,10 +14296,10 @@ OG.shape.bpmn.E_Intermediate_Rule.prototype.createShape = function () {
* @private
*/
OG.shape.bpmn.E_Intermediate_Timer = function (label) {
- OG.shape.bpmn.E_Intermediate_Timer.superclass.call(this);
+ OG.shape.bpmn.E_Intermediate_Timer.superclass.call(this);
- this.SHAPE_ID = 'OG.shape.bpmn.E_Intermediate_Timer';
- this.label = label;
+ this.SHAPE_ID = 'OG.shape.bpmn.E_Intermediate_Timer';
+ this.label = label;
};
OG.shape.bpmn.E_Intermediate_Timer.prototype = new OG.shape.bpmn.Event();
OG.shape.bpmn.E_Intermediate_Timer.superclass = OG.shape.bpmn.Event;
@@ -14303,39 +14313,39 @@ OG.E_Intermediate_Timer = OG.shape.bpmn.E_Intermediate_Timer;
* @override
*/
OG.shape.bpmn.E_Intermediate_Timer.prototype.createShape = function () {
- var geom1, geom2, geomCollection = [];
- if (this.geom) {
- return this.geom;
- }
-
- geom1 = new OG.geometry.Circle([50, 50], 32);
-
- geom2 = new OG.geometry.PolyLine([
- [50, 30],
- [50, 50],
- [70, 50]
- ]);
-
- geomCollection.push(new OG.geometry.Circle([50, 50], 50));
- geomCollection.push(new OG.geometry.Circle([50, 50], 42));
- geomCollection.push(geom1);
- geomCollection.push(new OG.geometry.Line([50, 18], [50, 25]));
- geomCollection.push(new OG.geometry.Line([50, 82], [50, 75]));
- geomCollection.push(new OG.geometry.Line([18, 50], [25, 50]));
- geomCollection.push(new OG.geometry.Line([82, 50], [75, 50]));
- geomCollection.push(geom2);
-
- this.geom = new OG.geometry.GeometryCollection(geomCollection);
- this.geom.style = new OG.geometry.Style({
- 'label-position': 'bottom',
- //"stroke" : "#969149",
- "stroke" : "black",
- "stroke-width" : 1.5,
- fill : "white",
- "fill-opacity" : 1
- });
-
- return this.geom;
+ var geom1, geom2, geomCollection = [];
+ if (this.geom) {
+ return this.geom;
+ }
+
+ geom1 = new OG.geometry.Circle([50, 50], 32);
+
+ geom2 = new OG.geometry.PolyLine([
+ [50, 30],
+ [50, 50],
+ [70, 50]
+ ]);
+
+ geomCollection.push(new OG.geometry.Circle([50, 50], 50));
+ geomCollection.push(new OG.geometry.Circle([50, 50], 42));
+ geomCollection.push(geom1);
+ geomCollection.push(new OG.geometry.Line([50, 18], [50, 25]));
+ geomCollection.push(new OG.geometry.Line([50, 82], [50, 75]));
+ geomCollection.push(new OG.geometry.Line([18, 50], [25, 50]));
+ geomCollection.push(new OG.geometry.Line([82, 50], [75, 50]));
+ geomCollection.push(geom2);
+
+ this.geom = new OG.geometry.GeometryCollection(geomCollection);
+ this.geom.style = new OG.geometry.Style({
+ 'label-position': 'bottom',
+ //"stroke" : "#969149",
+ "stroke": "black",
+ "stroke-width": 1.5,
+ fill: "white",
+ "fill-opacity": 1
+ });
+
+ return this.geom;
};
/**
* BPMN : Link Start Event Shape
@@ -14446,7 +14456,7 @@ OG.shape.bpmn.E_Start_Error.prototype.createShape = function () {
this.geom = new OG.geometry.GeometryCollection(geomCollection);
this.geom.style = new OG.geometry.Style({
'label-position': 'bottom',
- "stroke-width" : 1.5
+ "stroke-width": 1.5
});
return this.geom;
@@ -14464,10 +14474,10 @@ OG.shape.bpmn.E_Start_Error.prototype.createShape = function () {
* @private
*/
OG.shape.bpmn.E_Start_Link = function (label) {
- OG.shape.bpmn.E_Start_Link.superclass.call(this);
+ OG.shape.bpmn.E_Start_Link.superclass.call(this);
- this.SHAPE_ID = 'OG.shape.bpmn.E_Start_Link';
- this.label = label;
+ this.SHAPE_ID = 'OG.shape.bpmn.E_Start_Link';
+ this.label = label;
};
OG.shape.bpmn.E_Start_Link.prototype = new OG.shape.bpmn.Event();
OG.shape.bpmn.E_Start_Link.superclass = OG.shape.bpmn.Event;
@@ -14481,31 +14491,31 @@ OG.E_Start_Link = OG.shape.bpmn.E_Start_Link;
* @override
*/
OG.shape.bpmn.E_Start_Link.prototype.createShape = function () {
- var geom1, geomCollection = [];
- if (this.geom) {
- return this.geom;
- }
+ var geom1, geomCollection = [];
+ if (this.geom) {
+ return this.geom;
+ }
- geom1 = new OG.geometry.Polygon([
- [20, 35],
- [20, 65],
- [60, 65],
- [60, 80],
- [85, 50],
- [60, 20],
- [60, 35]
- ]);
+ geom1 = new OG.geometry.Polygon([
+ [20, 35],
+ [20, 65],
+ [60, 65],
+ [60, 80],
+ [85, 50],
+ [60, 20],
+ [60, 35]
+ ]);
- geomCollection.push(new OG.geometry.Circle([50, 50], 50));
- geomCollection.push(new OG.geometry.Circle([50, 50], 42));
- geomCollection.push(geom1);
+ geomCollection.push(new OG.geometry.Circle([50, 50], 50));
+ geomCollection.push(new OG.geometry.Circle([50, 50], 42));
+ geomCollection.push(geom1);
- this.geom = new OG.geometry.GeometryCollection(geomCollection);
- this.geom.style = new OG.geometry.Style({
- 'label-position': 'bottom'
- });
+ this.geom = new OG.geometry.GeometryCollection(geomCollection);
+ this.geom.style = new OG.geometry.Style({
+ 'label-position': 'bottom'
+ });
- return this.geom;
+ return this.geom;
};
/**
* BPMN : Message Start Event Shape
@@ -14520,10 +14530,10 @@ OG.shape.bpmn.E_Start_Link.prototype.createShape = function () {
* @private
*/
OG.shape.bpmn.E_Start_Message = function (label) {
- OG.shape.bpmn.E_Start_Message.superclass.call(this);
+ OG.shape.bpmn.E_Start_Message.superclass.call(this);
- this.SHAPE_ID = 'OG.shape.bpmn.E_Start_Message';
- this.label = label;
+ this.SHAPE_ID = 'OG.shape.bpmn.E_Start_Message';
+ this.label = label;
};
OG.shape.bpmn.E_Start_Message.prototype = new OG.shape.bpmn.Event();
OG.shape.bpmn.E_Start_Message.superclass = OG.shape.bpmn.Event;
@@ -14537,42 +14547,42 @@ OG.E_Start_Message = OG.shape.bpmn.E_Start_Message;
* @override
*/
OG.shape.bpmn.E_Start_Message.prototype.createShape = function () {
- var geom1, geom2, geom3, geomCollection = [];
- if (this.geom) {
- return this.geom;
- }
-
- geom1 = new OG.geometry.Circle([50, 50], 50);
- geom1.style = new OG.geometry.Style({
- "stroke-width": 1.5
- });
-
- geom2 = new OG.geometry.PolyLine([
- [20, 25],
- [50, 45],
- [80, 25],
- [20, 25]
- ]);
-
- geom3 = new OG.geometry.PolyLine([
- [20, 35],
- [20, 70],
- [80, 70],
- [80, 35],
- [50, 55],
- [20, 35]
- ]);
-
- geomCollection.push(geom1);
- geomCollection.push(geom2);
- geomCollection.push(geom3);
-
- this.geom = new OG.geometry.GeometryCollection(geomCollection);
- this.geom.style = new OG.geometry.Style({
- 'label-position': 'bottom'
- });
-
- return this.geom;
+ var geom1, geom2, geom3, geomCollection = [];
+ if (this.geom) {
+ return this.geom;
+ }
+
+ geom1 = new OG.geometry.Circle([50, 50], 50);
+ geom1.style = new OG.geometry.Style({
+ "stroke-width": 1.5
+ });
+
+ geom2 = new OG.geometry.PolyLine([
+ [20, 25],
+ [50, 45],
+ [80, 25],
+ [20, 25]
+ ]);
+
+ geom3 = new OG.geometry.PolyLine([
+ [20, 35],
+ [20, 70],
+ [80, 70],
+ [80, 35],
+ [50, 55],
+ [20, 35]
+ ]);
+
+ geomCollection.push(geom1);
+ geomCollection.push(geom2);
+ geomCollection.push(geom3);
+
+ this.geom = new OG.geometry.GeometryCollection(geomCollection);
+ this.geom.style = new OG.geometry.Style({
+ 'label-position': 'bottom'
+ });
+
+ return this.geom;
};
/**
* BPMN : Multiple Start Event Shape
@@ -14587,10 +14597,10 @@ OG.shape.bpmn.E_Start_Message.prototype.createShape = function () {
* @private
*/
OG.shape.bpmn.E_Start_Multiple = function (label) {
- OG.shape.bpmn.E_Start_Multiple.superclass.call(this);
+ OG.shape.bpmn.E_Start_Multiple.superclass.call(this);
- this.SHAPE_ID = 'OG.shape.bpmn.E_Start_Multiple';
- this.label = label;
+ this.SHAPE_ID = 'OG.shape.bpmn.E_Start_Multiple';
+ this.label = label;
};
OG.shape.bpmn.E_Start_Multiple.prototype = new OG.shape.bpmn.Event();
OG.shape.bpmn.E_Start_Multiple.superclass = OG.shape.bpmn.Event;
@@ -14604,37 +14614,37 @@ OG.E_Start_Multiple = OG.shape.bpmn.E_Start_Multiple;
* @override
*/
OG.shape.bpmn.E_Start_Multiple.prototype.createShape = function () {
- var geom1, geom2, geomCollection = [];
- if (this.geom) {
- return this.geom;
- }
-
- geom1 = new OG.geometry.Circle([50, 50], 50);
-
- geom2 = new OG.geometry.Polygon([
- [50, 15],
- [39, 33],
- [20, 33],
- [29, 50],
- [19, 67],
- [40, 67],
- [50, 85],
- [60, 68],
- [80, 68],
- [70, 50],
- [79, 33],
- [60, 33]
- ]);
-
- geomCollection.push(geom1);
- geomCollection.push(geom2);
-
- this.geom = new OG.geometry.GeometryCollection(geomCollection);
- this.geom.style = new OG.geometry.Style({
- 'label-position': 'bottom'
- });
-
- return this.geom;
+ var geom1, geom2, geomCollection = [];
+ if (this.geom) {
+ return this.geom;
+ }
+
+ geom1 = new OG.geometry.Circle([50, 50], 50);
+
+ geom2 = new OG.geometry.Polygon([
+ [50, 15],
+ [39, 33],
+ [20, 33],
+ [29, 50],
+ [19, 67],
+ [40, 67],
+ [50, 85],
+ [60, 68],
+ [80, 68],
+ [70, 50],
+ [79, 33],
+ [60, 33]
+ ]);
+
+ geomCollection.push(geom1);
+ geomCollection.push(geom2);
+
+ this.geom = new OG.geometry.GeometryCollection(geomCollection);
+ this.geom.style = new OG.geometry.Style({
+ 'label-position': 'bottom'
+ });
+
+ return this.geom;
};
/**
* BPMN : Rule Start Event Shape
@@ -14649,10 +14659,10 @@ OG.shape.bpmn.E_Start_Multiple.prototype.createShape = function () {
* @private
*/
OG.shape.bpmn.E_Start_Rule = function (label) {
- OG.shape.bpmn.E_Start_Rule.superclass.call(this);
+ OG.shape.bpmn.E_Start_Rule.superclass.call(this);
- this.SHAPE_ID = 'OG.shape.bpmn.E_Start_Rule';
- this.label = label;
+ this.SHAPE_ID = 'OG.shape.bpmn.E_Start_Rule';
+ this.label = label;
};
OG.shape.bpmn.E_Start_Rule.prototype = new OG.shape.bpmn.Event();
OG.shape.bpmn.E_Start_Rule.superclass = OG.shape.bpmn.Event;
@@ -14666,31 +14676,31 @@ OG.E_Start_Rule = OG.shape.bpmn.E_Start_Rule;
* @override
*/
OG.shape.bpmn.E_Start_Rule.prototype.createShape = function () {
- var geom1, geom2, geomCollection = [];
- if (this.geom) {
- return this.geom;
- }
+ var geom1, geom2, geomCollection = [];
+ if (this.geom) {
+ return this.geom;
+ }
- geom1 = new OG.geometry.Circle([50, 50], 50);
- geom1.style = new OG.geometry.Style({
- "stroke-width": 1.5
- });
+ geom1 = new OG.geometry.Circle([50, 50], 50);
+ geom1.style = new OG.geometry.Style({
+ "stroke-width": 1.5
+ });
- geom2 = new OG.geometry.Rectangle([25, 20], 50, 60);
+ geom2 = new OG.geometry.Rectangle([25, 20], 50, 60);
- geomCollection.push(geom1);
- geomCollection.push(geom2);
- geomCollection.push(new OG.geometry.Line([30, 30], [70, 30]));
- geomCollection.push(new OG.geometry.Line([30, 45], [70, 45]));
- geomCollection.push(new OG.geometry.Line([30, 60], [70, 60]));
- geomCollection.push(new OG.geometry.Line([30, 70], [70, 70]));
+ geomCollection.push(geom1);
+ geomCollection.push(geom2);
+ geomCollection.push(new OG.geometry.Line([30, 30], [70, 30]));
+ geomCollection.push(new OG.geometry.Line([30, 45], [70, 45]));
+ geomCollection.push(new OG.geometry.Line([30, 60], [70, 60]));
+ geomCollection.push(new OG.geometry.Line([30, 70], [70, 70]));
- this.geom = new OG.geometry.GeometryCollection(geomCollection);
- this.geom.style = new OG.geometry.Style({
- 'label-position': 'bottom'
- });
+ this.geom = new OG.geometry.GeometryCollection(geomCollection);
+ this.geom.style = new OG.geometry.Style({
+ 'label-position': 'bottom'
+ });
- return this.geom;
+ return this.geom;
};
/**
* BPMN : Timer Start Event Shape
@@ -14705,10 +14715,10 @@ OG.shape.bpmn.E_Start_Rule.prototype.createShape = function () {
* @private
*/
OG.shape.bpmn.E_Start_Timer = function (label) {
- OG.shape.bpmn.E_Start_Timer.superclass.call(this);
+ OG.shape.bpmn.E_Start_Timer.superclass.call(this);
- this.SHAPE_ID = 'OG.shape.bpmn.E_Start_Timer';
- this.label = label;
+ this.SHAPE_ID = 'OG.shape.bpmn.E_Start_Timer';
+ this.label = label;
};
OG.shape.bpmn.E_Start_Timer.prototype = new OG.shape.bpmn.Event();
OG.shape.bpmn.E_Start_Timer.superclass = OG.shape.bpmn.Event;
@@ -14722,38 +14732,38 @@ OG.E_Start_Timer = OG.shape.bpmn.E_Start_Timer;
* @override
*/
OG.shape.bpmn.E_Start_Timer.prototype.createShape = function () {
- var geom1, geom2, geom3, geomCollection = [];
- if (this.geom) {
- return this.geom;
- }
+ var geom1, geom2, geom3, geomCollection = [];
+ if (this.geom) {
+ return this.geom;
+ }
- geom1 = new OG.geometry.Circle([50, 50], 50);
- geom1.style = new OG.geometry.Style({
- "stroke-width": 1.5
- });
+ geom1 = new OG.geometry.Circle([50, 50], 50);
+ geom1.style = new OG.geometry.Style({
+ "stroke-width": 1.5
+ });
- geom2 = new OG.geometry.Circle([50, 50], 32);
+ geom2 = new OG.geometry.Circle([50, 50], 32);
- geom3 = new OG.geometry.PolyLine([
- [50, 30],
- [50, 50],
- [70, 50]
- ]);
+ geom3 = new OG.geometry.PolyLine([
+ [50, 30],
+ [50, 50],
+ [70, 50]
+ ]);
- geomCollection.push(geom1);
- geomCollection.push(geom2);
- geomCollection.push(new OG.geometry.Line([50, 18], [50, 25]));
- geomCollection.push(new OG.geometry.Line([50, 82], [50, 75]));
- geomCollection.push(new OG.geometry.Line([18, 50], [25, 50]));
- geomCollection.push(new OG.geometry.Line([82, 50], [75, 50]));
- geomCollection.push(geom3);
+ geomCollection.push(geom1);
+ geomCollection.push(geom2);
+ geomCollection.push(new OG.geometry.Line([50, 18], [50, 25]));
+ geomCollection.push(new OG.geometry.Line([50, 82], [50, 75]));
+ geomCollection.push(new OG.geometry.Line([18, 50], [25, 50]));
+ geomCollection.push(new OG.geometry.Line([82, 50], [75, 50]));
+ geomCollection.push(geom3);
- this.geom = new OG.geometry.GeometryCollection(geomCollection);
- this.geom.style = new OG.geometry.Style({
- 'label-position': 'bottom'
- });
+ this.geom = new OG.geometry.GeometryCollection(geomCollection);
+ this.geom.style = new OG.geometry.Style({
+ 'label-position': 'bottom'
+ });
- return this.geom;
+ return this.geom;
};
/**
* BPMN : Terminate Event Shape
@@ -14768,9 +14778,9 @@ OG.shape.bpmn.E_Start_Timer.prototype.createShape = function () {
* @private
*/
OG.shape.bpmn.E_Terminate = function (label) {
- OG.shape.bpmn.E_Terminate.superclass.call(this, label);
+ OG.shape.bpmn.E_Terminate.superclass.call(this, label);
- this.SHAPE_ID = 'OG.shape.bpmn.E_Terminate';
+ this.SHAPE_ID = 'OG.shape.bpmn.E_Terminate';
};
OG.shape.bpmn.E_Terminate.prototype = new OG.shape.bpmn.E_End();
OG.shape.bpmn.E_Terminate.superclass = OG.shape.bpmn.E_End;
@@ -14784,31 +14794,31 @@ OG.E_Terminate = OG.shape.bpmn.E_Terminate;
* @override
*/
OG.shape.bpmn.E_Terminate.prototype.createShape = function () {
- var geom1, geom2, geomCollection = [];
- if (this.geom) {
- return this.geom;
- }
+ var geom1, geom2, geomCollection = [];
+ if (this.geom) {
+ return this.geom;
+ }
- geom1 = new OG.geometry.Circle([50, 50], 50);
- geom1.style = new OG.geometry.Style({
- "stroke-width": 3
- });
+ geom1 = new OG.geometry.Circle([50, 50], 50);
+ geom1.style = new OG.geometry.Style({
+ "stroke-width": 3
+ });
- geom2 = new OG.geometry.Circle([50, 50], 30);
- geom2.style = new OG.geometry.Style({
- "fill" : "black",
- "fill-opacity": 1
- });
+ geom2 = new OG.geometry.Circle([50, 50], 30);
+ geom2.style = new OG.geometry.Style({
+ "fill": "black",
+ "fill-opacity": 1
+ });
- geomCollection.push(geom1);
- geomCollection.push(geom2);
+ geomCollection.push(geom1);
+ geomCollection.push(geom2);
- this.geom = new OG.geometry.GeometryCollection(geomCollection);
- this.geom.style = new OG.geometry.Style({
- 'label-position': 'bottom'
- });
+ this.geom = new OG.geometry.GeometryCollection(geomCollection);
+ this.geom.style = new OG.geometry.Style({
+ 'label-position': 'bottom'
+ });
- return this.geom;
+ return this.geom;
};
/**
* BPMN : Complex Gateway Shape
@@ -14823,10 +14833,10 @@ OG.shape.bpmn.E_Terminate.prototype.createShape = function () {
* @private
*/
OG.shape.bpmn.G_Complex = function (label) {
- OG.shape.bpmn.G_Complex.superclass.call(this);
+ OG.shape.bpmn.G_Complex.superclass.call(this);
- this.SHAPE_ID = 'OG.shape.bpmn.G_Complex';
- this.label = label;
+ this.SHAPE_ID = 'OG.shape.bpmn.G_Complex';
+ this.label = label;
};
OG.shape.bpmn.G_Complex.prototype = new OG.shape.bpmn.G_Gateway();
OG.shape.bpmn.G_Complex.superclass = OG.shape.bpmn.G_Gateway;
@@ -14840,47 +14850,47 @@ OG.G_Complex = OG.shape.bpmn.G_Complex;
* @override
*/
OG.shape.bpmn.G_Complex.prototype.createShape = function () {
- var geom1, geom2, geom3, geom4, geom5, geomCollection = [];
- if (this.geom) {
- return this.geom;
- }
+ var geom1, geom2, geom3, geom4, geom5, geomCollection = [];
+ if (this.geom) {
+ return this.geom;
+ }
- geom1 = new OG.geometry.Polygon([
- [0, 50],
- [50, 100],
- [100, 50],
- [50, 0]
- ]);
+ geom1 = new OG.geometry.Polygon([
+ [0, 50],
+ [50, 100],
+ [100, 50],
+ [50, 0]
+ ]);
- geom2 = new OG.geometry.Line([30, 30], [70, 70]);
- geom2.style = new OG.geometry.Style({
- "stroke-width": 3
- });
+ geom2 = new OG.geometry.Line([30, 30], [70, 70]);
+ geom2.style = new OG.geometry.Style({
+ "stroke-width": 3
+ });
- geom3 = new OG.geometry.Line([30, 70], [70, 30]);
- geom3.style = new OG.geometry.Style({
- "stroke-width": 3
- });
+ geom3 = new OG.geometry.Line([30, 70], [70, 30]);
+ geom3.style = new OG.geometry.Style({
+ "stroke-width": 3
+ });
- geom4 = new OG.geometry.Line([20, 50], [80, 50]);
- geom4.style = new OG.geometry.Style({
- "stroke-width": 3
- });
+ geom4 = new OG.geometry.Line([20, 50], [80, 50]);
+ geom4.style = new OG.geometry.Style({
+ "stroke-width": 3
+ });
- geom5 = new OG.geometry.Line([50, 20], [50, 80]);
- geom5.style = new OG.geometry.Style({
- "stroke-width": 3
- });
+ geom5 = new OG.geometry.Line([50, 20], [50, 80]);
+ geom5.style = new OG.geometry.Style({
+ "stroke-width": 3
+ });
- geomCollection.push(geom1);
- geomCollection.push(geom2);
- geomCollection.push(geom3);
- geomCollection.push(geom4);
- geomCollection.push(geom5);
+ geomCollection.push(geom1);
+ geomCollection.push(geom2);
+ geomCollection.push(geom3);
+ geomCollection.push(geom4);
+ geomCollection.push(geom5);
- this.geom = new OG.geometry.GeometryCollection(geomCollection);
+ this.geom = new OG.geometry.GeometryCollection(geomCollection);
- return this.geom;
+ return this.geom;
};
/**
* BPMN : Exclusive Gateway Shape
@@ -14895,10 +14905,10 @@ OG.shape.bpmn.G_Complex.prototype.createShape = function () {
* @private
*/
OG.shape.bpmn.G_Exclusive = function (label) {
- OG.shape.bpmn.G_Exclusive.superclass.call(this);
+ OG.shape.bpmn.G_Exclusive.superclass.call(this);
- this.SHAPE_ID = 'OG.shape.bpmn.G_Exclusive';
- this.label = label;
+ this.SHAPE_ID = 'OG.shape.bpmn.G_Exclusive';
+ this.label = label;
};
OG.shape.bpmn.G_Exclusive.prototype = new OG.shape.bpmn.G_Gateway();
OG.shape.bpmn.G_Exclusive.superclass = OG.shape.bpmn.G_Gateway;
@@ -14912,35 +14922,35 @@ OG.G_Exclusive = OG.shape.bpmn.G_Exclusive;
* @override
*/
OG.shape.bpmn.G_Exclusive.prototype.createShape = function () {
- var geom1, geom2, geom3, geomCollection = [];
- if (this.geom) {
- return this.geom;
- }
+ var geom1, geom2, geom3, geomCollection = [];
+ if (this.geom) {
+ return this.geom;
+ }
- geom1 = new OG.geometry.Polygon([
- [0, 50],
- [50, 100],
- [100, 50],
- [50, 0]
- ]);
+ geom1 = new OG.geometry.Polygon([
+ [0, 50],
+ [50, 100],
+ [100, 50],
+ [50, 0]
+ ]);
- geom2 = new OG.geometry.Line([30, 30], [70, 70]);
- geom2.style = new OG.geometry.Style({
- "stroke-width": 5
- });
+ geom2 = new OG.geometry.Line([30, 30], [70, 70]);
+ geom2.style = new OG.geometry.Style({
+ "stroke-width": 5
+ });
- geom3 = new OG.geometry.Line([30, 70], [70, 30]);
- geom3.style = new OG.geometry.Style({
- "stroke-width": 5
- });
+ geom3 = new OG.geometry.Line([30, 70], [70, 30]);
+ geom3.style = new OG.geometry.Style({
+ "stroke-width": 5
+ });
- geomCollection.push(geom1);
- geomCollection.push(geom2);
- geomCollection.push(geom3);
+ geomCollection.push(geom1);
+ geomCollection.push(geom2);
+ geomCollection.push(geom3);
- this.geom = new OG.geometry.GeometryCollection(geomCollection);
+ this.geom = new OG.geometry.GeometryCollection(geomCollection);
- return this.geom;
+ return this.geom;
};
/**
* BPMN : Inclusive Gateway Shape
@@ -14955,10 +14965,10 @@ OG.shape.bpmn.G_Exclusive.prototype.createShape = function () {
* @private
*/
OG.shape.bpmn.G_Inclusive = function (label) {
- OG.shape.bpmn.G_Inclusive.superclass.call(this);
+ OG.shape.bpmn.G_Inclusive.superclass.call(this);
- this.SHAPE_ID = 'OG.shape.bpmn.G_Inclusive';
- this.label = label;
+ this.SHAPE_ID = 'OG.shape.bpmn.G_Inclusive';
+ this.label = label;
};
OG.shape.bpmn.G_Inclusive.prototype = new OG.shape.bpmn.G_Gateway();
OG.shape.bpmn.G_Inclusive.superclass = OG.shape.bpmn.G_Gateway;
@@ -14972,29 +14982,29 @@ OG.G_Inclusive = OG.shape.bpmn.G_Inclusive;
* @override
*/
OG.shape.bpmn.G_Inclusive.prototype.createShape = function () {
- var geom1, geom2, geomCollection = [];
- if (this.geom) {
- return this.geom;
- }
+ var geom1, geom2, geomCollection = [];
+ if (this.geom) {
+ return this.geom;
+ }
- geom1 = new OG.geometry.Polygon([
- [0, 50],
- [50, 100],
- [100, 50],
- [50, 0]
- ]);
+ geom1 = new OG.geometry.Polygon([
+ [0, 50],
+ [50, 100],
+ [100, 50],
+ [50, 0]
+ ]);
- geom2 = new OG.geometry.Circle([50, 50], 25);
- geom2.style = new OG.geometry.Style({
- "stroke-width": 3
- });
+ geom2 = new OG.geometry.Circle([50, 50], 25);
+ geom2.style = new OG.geometry.Style({
+ "stroke-width": 3
+ });
- geomCollection.push(geom1);
- geomCollection.push(geom2);
+ geomCollection.push(geom1);
+ geomCollection.push(geom2);
- this.geom = new OG.geometry.GeometryCollection(geomCollection);
+ this.geom = new OG.geometry.GeometryCollection(geomCollection);
- return this.geom;
+ return this.geom;
};
/**
* BPMN : Parallel Gateway Shape
@@ -15009,10 +15019,10 @@ OG.shape.bpmn.G_Inclusive.prototype.createShape = function () {
* @private
*/
OG.shape.bpmn.G_Parallel = function (label) {
- OG.shape.bpmn.G_Parallel.superclass.call(this);
+ OG.shape.bpmn.G_Parallel.superclass.call(this);
- this.SHAPE_ID = 'OG.shape.bpmn.G_Parallel';
- this.label = label;
+ this.SHAPE_ID = 'OG.shape.bpmn.G_Parallel';
+ this.label = label;
};
OG.shape.bpmn.G_Parallel.prototype = new OG.shape.bpmn.G_Gateway();
OG.shape.bpmn.G_Parallel.superclass = OG.shape.bpmn.G_Gateway;
@@ -15026,35 +15036,35 @@ OG.G_Parallel = OG.shape.bpmn.G_Parallel;
* @override
*/
OG.shape.bpmn.G_Parallel.prototype.createShape = function () {
- var geom1, geom2, geom3, geomCollection = [];
- if (this.geom) {
- return this.geom;
- }
+ var geom1, geom2, geom3, geomCollection = [];
+ if (this.geom) {
+ return this.geom;
+ }
- geom1 = new OG.geometry.Polygon([
- [0, 50],
- [50, 100],
- [100, 50],
- [50, 0]
- ]);
+ geom1 = new OG.geometry.Polygon([
+ [0, 50],
+ [50, 100],
+ [100, 50],
+ [50, 0]
+ ]);
- geom2 = new OG.geometry.Line([20, 50], [80, 50]);
- geom2.style = new OG.geometry.Style({
- "stroke-width": 5
- });
+ geom2 = new OG.geometry.Line([20, 50], [80, 50]);
+ geom2.style = new OG.geometry.Style({
+ "stroke-width": 5
+ });
- geom3 = new OG.geometry.Line([50, 20], [50, 80]);
- geom3.style = new OG.geometry.Style({
- "stroke-width": 5
- });
+ geom3 = new OG.geometry.Line([50, 20], [50, 80]);
+ geom3.style = new OG.geometry.Style({
+ "stroke-width": 5
+ });
- geomCollection.push(geom1);
- geomCollection.push(geom2);
- geomCollection.push(geom3);
+ geomCollection.push(geom1);
+ geomCollection.push(geom2);
+ geomCollection.push(geom3);
- this.geom = new OG.geometry.GeometryCollection(geomCollection);
+ this.geom = new OG.geometry.GeometryCollection(geomCollection);
- return this.geom;
+ return this.geom;
};
OG.shape.bpmn.MIParallel = function (label) {
OG.shape.bpmn.MIParallel.superclass.call(this);
@@ -15125,10 +15135,10 @@ OG.shape.bpmn.MISequential.prototype.createShape = function () {
return this.geom;
};
OG.shape.bpmn.M_Annotation = function (label) {
- OG.shape.bpmn.M_Annotation.superclass.call(this);
+ OG.shape.bpmn.M_Annotation.superclass.call(this);
- this.SHAPE_ID = 'OG.shape.bpmn.M_Annotation';
- this.label = label;
+ this.SHAPE_ID = 'OG.shape.bpmn.M_Annotation';
+ this.label = label;
};
OG.shape.bpmn.M_Annotation.prototype = new OG.shape.GeomShape();
OG.shape.bpmn.M_Annotation.superclass = OG.shape.GeomShape;
@@ -15142,38 +15152,37 @@ OG.M_Annotation = OG.shape.bpmn.M_Annotation;
* @override
*/
OG.shape.bpmn.M_Annotation.prototype.createShape = function () {
- if (this.geom) {
- return this.geom;
- }
+ if (this.geom) {
+ return this.geom;
+ }
- var geom1, geom2, geomCollection = [];
- if (this.geom) {
- return this.geom;
- }
+ var geom1, geom2, geomCollection = [];
+ if (this.geom) {
+ return this.geom;
+ }
- geom1 = new OG.geometry.Rectangle([0, 0], 100, 100);
- geom1.style = new OG.geometry.Style({
- "stroke": 'none'
- });
+ geom1 = new OG.geometry.Rectangle([0, 0], 100, 100);
+ geom1.style = new OG.geometry.Style({
+ "stroke": 'none'
+ });
- geom2 = new OG.geometry.PolyLine([
- [10, 0],
- [0, 0],
- [0, 100],
- [10, 100]
- ]);
- geom2.style = new OG.geometry.Style({
- "stroke": 'black'
- });
+ geom2 = new OG.geometry.PolyLine([
+ [10, 0],
+ [0, 0],
+ [0, 100],
+ [10, 100]
+ ]);
+ geom2.style = new OG.geometry.Style({
+ "stroke": 'black'
+ });
- geomCollection.push(geom1);
- geomCollection.push(geom2);
+ geomCollection.push(geom1);
+ geomCollection.push(geom2);
- this.geom = new OG.geometry.GeometryCollection(geomCollection);
- this.geom.style = new OG.geometry.Style({
- });
+ this.geom = new OG.geometry.GeometryCollection(geomCollection);
+ this.geom.style = new OG.geometry.Style({});
- return this.geom;
+ return this.geom;
};
/**
* BPMN : Group Shape
@@ -15241,13 +15250,13 @@ OG.shape.bpmn.M_Group.prototype.createShape = function () {
* @private
*/
OG.shape.bpmn.M_Text = function (label) {
- OG.shape.bpmn.M_Text.superclass.call(this);
+ OG.shape.bpmn.M_Text.superclass.call(this);
- this.SHAPE_ID = 'OG.shape.bpmn.M_Text';
- this.label = label || 'Text';
- //this.SELECTABLE = false;
- //this.CONNECTABLE = false;
- //this.MOVABLE = false;
+ this.SHAPE_ID = 'OG.shape.bpmn.M_Text';
+ this.label = label || 'Text';
+ //this.SELECTABLE = false;
+ //this.CONNECTABLE = false;
+ //this.MOVABLE = false;
};
OG.shape.bpmn.M_Text.prototype = new OG.shape.GeomShape();
OG.shape.bpmn.M_Text.superclass = OG.shape.GeomShape;
@@ -15261,16 +15270,16 @@ OG.M_Text = OG.shape.bpmn.M_Text;
* @override
*/
OG.shape.bpmn.M_Text.prototype.createShape = function () {
- if (this.geom) {
- return this.geom;
- }
+ if (this.geom) {
+ return this.geom;
+ }
- this.geom = new OG.geometry.Rectangle([0, 0], 100, 100);
- this.geom.style = new OG.geometry.Style({
- stroke: "none"
- });
+ this.geom = new OG.geometry.Rectangle([0, 0], 100, 100);
+ this.geom.style = new OG.geometry.Style({
+ stroke: "none"
+ });
- return this.geom;
+ return this.geom;
};
OG.shape.bpmn.ParallelMultiple = function (label) {
OG.shape.bpmn.ParallelMultiple.superclass.call(this);
@@ -15320,7 +15329,7 @@ OG.shape.bpmn.ParallelMultiple.prototype.createShape = function () {
this.geom.style = new OG.geometry.Style({
'label-position': 'bottom',
"stroke-width": 1.5,
- "stroke" : "#969149",
+ "stroke": "#969149",
fill: "white",
"fill-opacity": 1
});
@@ -15345,7 +15354,7 @@ OG.ScopeActivity = OG.shape.bpmn.ScopeActivity;
OG.shape.bpmn.ScopeActivity.prototype.layoutChild = function () {
- for(var event in this.Events){
+ for (var event in this.Events) {
//TODO:
//var shapeOfEvent = event.shape;
//shapeOfEvent.x = .... ;
@@ -15403,7 +15412,7 @@ OG.shape.bpmn.Signal.prototype.createShape = function () {
this.geom.style = new OG.geometry.Style({
'label-position': 'bottom',
"stroke-width": 1.5,
- "stroke" : "#969149",
+ "stroke": "#969149",
fill: "white",
"fill-opacity": 1
});
@@ -15728,14 +15737,14 @@ OG.shape.elec.BLDG.prototype.createShape = function () {
this.geom = new OG.geometry.Rectangle([0, 0], 100, 100);
this.geom.style = new OG.geometry.Style({
'label-direction': 'horizontal',
- 'vertical-align' : 'top',
+ 'vertical-align': 'top',
'fill': '#ffffff',
'fill-opacity': 0,
- 'title-size' : 26,
+ 'title-size': 26,
'label-fill': '#428bca',
'label-fill-opacity': 1,
'font-weight': 700,
- 'font-color' : 'white'
+ 'font-color': 'white'
});
return this.geom;
@@ -15931,7 +15940,7 @@ OG.shape.elec.EHLoad.prototype.constructor = OG.shape.elec.EHLoad;
OG.EHLoad = OG.shape.elec.EHLoad;
OG.shape.elec.EHLoad.prototype.createShape = function () {
- var geom1, geom2,geom3,geom4, geomCollection = [];
+ var geom1, geom2, geom3, geom4, geomCollection = [];
if (this.geom) {
return this.geom;
}
@@ -16006,7 +16015,7 @@ OG.shape.elec.EHSLoad.prototype.constructor = OG.shape.elec.EHSLoad;
OG.EHSLoad = OG.shape.elec.EHSLoad;
OG.shape.elec.EHSLoad.prototype.createShape = function () {
- var geom1, geom2,geom3,geom4, geomCollection = [];
+ var geom1, geom2, geom3, geom4, geomCollection = [];
if (this.geom) {
return this.geom;
}
@@ -16088,14 +16097,14 @@ OG.shape.elec.HierarchyBldg.prototype.createShape = function () {
this.geom = new OG.geometry.Rectangle([0, 0], 100, 100);
this.geom.style = new OG.geometry.Style({
'label-direction': 'vertical',
- 'vertical-align' : 'top',
- 'fill' : '#ffffff',
+ 'vertical-align': 'top',
+ 'fill': '#ffffff',
'fill-opacity': 0,
- 'title-size' : 26,
+ 'title-size': 26,
'label-fill': '#428bca',
'label-fill-opacity': 1,
'font-weight': 700,
- 'font-color' : 'white'
+ 'font-color': 'white'
});
return this.geom;
@@ -16247,14 +16256,14 @@ OG.shape.elec.HierarchyFloor.prototype.createShape = function () {
this.geom = new OG.geometry.Rectangle([0, 0], 100, 100);
this.geom.style = new OG.geometry.Style({
'label-direction': 'vertical',
- 'vertical-align' : 'top',
- 'fill' : '#ffffff',
+ 'vertical-align': 'top',
+ 'fill': '#ffffff',
'fill-opacity': 0,
- 'title-size' : 26,
+ 'title-size': 26,
'label-fill': '#428bca',
'label-fill-opacity': 1,
'font-weight': 700,
- 'font-color' : 'white'
+ 'font-color': 'white'
});
return this.geom;
@@ -16339,9 +16348,7 @@ OG.shape.elec.Location.prototype.createSubShape = function () {
return;
}
- this.sub = [
-
- ];
+ this.sub = [];
return this.sub;
};
@@ -16458,16 +16465,16 @@ OG.shape.elec.MKLoad.prototype.constructor = OG.shape.elec.MKLoad;
OG.MKLoad = OG.shape.elec.MKLoad;
OG.shape.elec.MKLoad.prototype.createShape = function () {
- var geom1, geom2,geom3,geom4,geom5, geomCollection = [];
+ var geom1, geom2, geom3, geom4, geom5, geomCollection = [];
if (this.geom) {
return this.geom;
}
- geom1 = new OG.geometry.Polygon([[10, 0],[27,10],[10,20]]);
- geom2 = new OG.geometry.Polygon([[44, 0],[27,10],[44,20]]);
- geom3 = new OG.geometry.Line([27,10],[27,20]);
- geom4 = new OG.geometry.Circle([27,27],7);
- geom5 = new OG.geometry.PolyLine([[24,30],[24,24],[27,28],[30,24],[30,30]]);
+ geom1 = new OG.geometry.Polygon([[10, 0], [27, 10], [10, 20]]);
+ geom2 = new OG.geometry.Polygon([[44, 0], [27, 10], [44, 20]]);
+ geom3 = new OG.geometry.Line([27, 10], [27, 20]);
+ geom4 = new OG.geometry.Circle([27, 27], 7);
+ geom5 = new OG.geometry.PolyLine([[24, 30], [24, 24], [27, 28], [30, 24], [30, 30]]);
geomCollection.push(geom1);
geomCollection.push(geom2);
@@ -16601,9 +16608,7 @@ OG.shape.elec.Manhole.prototype.createSubShape = function () {
return;
}
- this.sub = [
-
- ];
+ this.sub = [];
return this.sub;
};
@@ -16826,7 +16831,7 @@ OG.shape.elec.RacewayShape.prototype.createShape = function () {
top: 0,
from: 'start',
to: 'end',
- style:{
+ style: {
//'stroke': 'none',
'fill-opacity': 1,
animation: [
@@ -16869,7 +16874,7 @@ OG.shape.elec.RacewayShape.prototype.createShape = function () {
OG.shape.elec.RacewayShape.prototype.createContextMenu = function () {
var me = this;
- var options = {'':''};
+ var options = {'': ''};
if (this.data && this.data.pathList) {
for (var i = 0; i < this.data.pathList.length; i++) {
options[this.data.pathList[i]['value']] = this.data.pathList[i]['name'];
@@ -17868,8 +17873,7 @@ OG.shape.component.DataTable.prototype.addCellContent = function (cellView, cont
//위치가 같은 경우 순서를 조작하지 않음.
if (beforeIndex == newIndex) {
me.redrawCell(cellView);
- }
- else {
+ } else {
//뒤로 순서가 이동하는 경우, 자신의 기존 인덱스를 고려하여 newIndex 에서 1 후퇴.
if (newIndex > beforeIndex) {
newIndex = newIndex - 1;
@@ -18786,8 +18790,7 @@ OG.shape.component.DataTable.prototype.drawCellContent = function (cellView, inf
);
me.currentCanvas.resizeBox(contentElement, [contentW, contentH], true);
me.currentCanvas.moveCentroid(contentElement, contentCenter, true);
- }
- else {
+ } else {
contentElement = me.currentCanvas.drawShape(
contentCenter,
renderShape,
@@ -18815,8 +18818,7 @@ OG.shape.component.DataTable.prototype.drawCellContent = function (cellView, inf
if (!me.options.enableMoveOutSide) {
me.currentElement.appendChild(contentElement);
me.redrawCell(cellView);
- }
- else {
+ } else {
//셀에 자신의 정보를 삭제한 후, 등록된 이벤트 핸들러들을 스스로 초기화시킨다.
me.removeCellContent(element, true);
element.shape.onRemoveShape = function () {
@@ -19009,8 +19011,7 @@ OG.shape.component.DataTable.prototype.onCellResize = function (cell, offset) {
if (me.options.resizeAxis != 'X') {
me.data.viewData.columnHeight = boundary.getHeight();
}
- }
- else if (cellView.type == 'cell') {
+ } else if (cellView.type == 'cell') {
//뷰 데이터의 rowHeight 를 변경한다.
if (me.options.resizeAxis != 'X') {
me.data.viewData.rows[rowIndex].rowHeight = boundary.getHeight();
@@ -19221,9 +19222,9 @@ OG.shape.component.DataTable.prototype.cutAndPaste = function (beforeColumn, aft
afterCell = row.cells[afterColumn];
if (beforeCell && afterCell) {
cellInformation = me.getCellInformation(beforeCell);
- if(cellInformation.contentElements && cellInformation.contentElements.length){
+ if (cellInformation.contentElements && cellInformation.contentElements.length) {
var elementsWithValues = [];
- $.each(cellInformation.contentElements, function(c, contentElement){
+ $.each(cellInformation.contentElements, function (c, contentElement) {
elementsWithValues.push({
element: contentElement,
value: null
@@ -19436,7 +19437,6 @@ OG.shape.component.Cell.prototype.createContextMenu = function () {
};
-
/**
* 도형의 Style 과 Shape 정보를 통해 캔버스에 렌더링 기능을 정의한 인터페이스
*
@@ -20314,7 +20314,7 @@ OG.renderer.IRenderer.prototype = {
y2: 0
};
- for (var i = 0,leni = shapeElements.length; i < leni; i++) {
+ for (var i = 0, leni = shapeElements.length; i < leni; i++) {
shape = shapeElements[i].shape;
if (shape && shape.geom) {
envelope = shape.geom.getBoundary();
@@ -20383,7 +20383,7 @@ OG.renderer.IRenderer.prototype = {
var prevShapeId, nextShapeId;
var prevEdges = this.getPrevEdges(fromElement);
var nextEdges = this.getNextEdges(fromElement);
- for (var i = 0,leni = prevEdges.length; i < leni; i++) {
+ for (var i = 0, leni = prevEdges.length; i < leni; i++) {
prevShapeId = $(prevEdges[i]).attr('_from');
if (prevShapeId) {
prevShapeId = prevShapeId.substring(0, prevShapeId.indexOf(OG.Constants.TERMINAL));
@@ -20392,7 +20392,7 @@ OG.renderer.IRenderer.prototype = {
}
}
}
- for (var i = 0,leni = nextEdges.length; i < leni; i++) {
+ for (var i = 0, leni = nextEdges.length; i < leni; i++) {
nextShapeId = $(nextEdges[i]).attr('_to');
if (nextShapeId) {
nextShapeId = nextShapeId.substring(0, nextShapeId.indexOf(OG.Constants.TERMINAL));
@@ -20416,7 +20416,7 @@ OG.renderer.IRenderer.prototype = {
if (prevEdgeIds) {
edgeIds = prevEdgeIds.split(',');
- for (var i = 0,leni = edgeIds.length; i < leni; i++) {
+ for (var i = 0, leni = edgeIds.length; i < leni; i++) {
edge = this.getElementById(edgeIds[i]);
if (edge) {
edgeArray.push(edge);
@@ -20440,7 +20440,7 @@ OG.renderer.IRenderer.prototype = {
if (nextEdgeIds) {
edgeIds = nextEdgeIds.split(',');
- for (var i = 0,leni = edgeIds.length; i < leni; i++) {
+ for (var i = 0, leni = edgeIds.length; i < leni; i++) {
edge = this.getElementById(edgeIds[i]);
if (edge) {
edgeArray.push(edge);
@@ -20462,7 +20462,7 @@ OG.renderer.IRenderer.prototype = {
shapeArray = [],
prevShapeId, shape, i;
- for (var i = 0,leni = prevEdges.length; i < leni; i++) {
+ for (var i = 0, leni = prevEdges.length; i < leni; i++) {
prevShapeId = $(prevEdges[i]).attr('_from');
if (prevShapeId) {
prevShapeId = prevShapeId.substring(0, prevShapeId.indexOf(OG.Constants.TERMINAL));
@@ -20487,7 +20487,7 @@ OG.renderer.IRenderer.prototype = {
shapeArray = [],
prevShapeId, i;
- for (var i = 0,leni = prevEdges.length; i < leni; i++) {
+ for (var i = 0, leni = prevEdges.length; i < leni; i++) {
prevShapeId = $(prevEdges[i]).attr('_from');
if (prevShapeId) {
prevShapeId = prevShapeId.substring(0, prevShapeId.indexOf(OG.Constants.TERMINAL));
@@ -20508,7 +20508,7 @@ OG.renderer.IRenderer.prototype = {
shapeArray = [],
nextShapeId, shape, i;
- for (var i = 0,leni = nextEdges.length; i < leni; i++) {
+ for (var i = 0, leni = nextEdges.length; i < leni; i++) {
nextShapeId = $(nextEdges[i]).attr('_to');
if (nextShapeId) {
nextShapeId = nextShapeId.substring(0, nextShapeId.indexOf(OG.Constants.TERMINAL));
@@ -20533,7 +20533,7 @@ OG.renderer.IRenderer.prototype = {
shapeArray = [],
nextShapeId, i;
- for (var i = 0,leni = nextEdges.length; i < leni; i++) {
+ for (var i = 0, leni = nextEdges.length; i < leni; i++) {
nextShapeId = $(nextEdges[i]).attr('_to');
if (nextShapeId) {
nextShapeId = nextShapeId.substring(0, nextShapeId.indexOf(OG.Constants.TERMINAL));
@@ -21053,9 +21053,7 @@ OG.renderer.RaphaelRenderer.prototype._drawSubShape = function (groupElement) {
//0 보다 큰 인덱스는 groupElement 에 순서대로 인서트한다.
if (index >= 0) {
groupElement.appendChild(child);
- }
-
- else {
+ } else {
//기준이 없다면 순서대로 인서트한다.
if (!standardChild) {
groupElement.appendChild(child);
@@ -21169,20 +21167,15 @@ OG.renderer.RaphaelRenderer.prototype._drawGeometry = function (groupElement, ge
if (distance.indexOf('%') != -1) {
distance = parseInt(distance.replace('%', ''));
length = totalLenth * (distance / 100);
- }
- else if (distance == 'start') {
+ } else if (distance == 'start') {
length = 0;
- }
- else if (distance == 'center') {
+ } else if (distance == 'center') {
length = totalLenth / 2;
- }
- else if (distance == 'end') {
+ } else if (distance == 'end') {
length = totalLenth;
- }
- else if (distance.indexOf('end-') != -1) {
+ } else if (distance.indexOf('end-') != -1) {
length = totalLenth - getSubDistance(nodePath, distance.replace('end-', ''));
- }
- else {
+ } else {
distance = parseInt(distance);
length = distance;
}
@@ -21485,12 +21478,10 @@ OG.renderer.RaphaelRenderer.prototype._drawGeometry = function (groupElement, ge
if (makerData['start'] && makerData['end']) {
from = makerData['start']['markerWidth'] * 1.5;
to = totalLenth - makerData['end']['markerWidth'] * 1.5;
- }
- else if (makerData['start'] && !makerData['end']) {
+ } else if (makerData['start'] && !makerData['end']) {
from = makerData['start']['markerWidth'] * 1.5;
to = totalLenth;
- }
- else if (!makerData['start'] && makerData['end']) {
+ } else if (!makerData['start'] && makerData['end']) {
from = 0;
to = totalLenth - makerData['end']['markerWidth'] * 1.5;
} else {
@@ -22788,7 +22779,8 @@ OG.renderer.RaphaelRenderer.prototype.drawEdge = function (line, style, id, isSe
};
OG.renderer.RaphaelRenderer.prototype.drawGroup = function (geometry, style, id) {
- var me = this, group, geomElement, _style = {}, childNodes, i, boundary, titleLine, group_hidden, _tempStyle = {}, geom_shadow;
+ var me = this, group, geomElement, _style = {}, childNodes, i, boundary, titleLine, group_hidden, _tempStyle = {},
+ geom_shadow;
OG.Util.apply(_style, (style instanceof OG.geometry.Style) ? style.map : style || {});
@@ -22930,7 +22922,9 @@ OG.renderer.RaphaelRenderer.prototype.drawLabel = function (shapeElement, text,
break;
}
}
- return intersectArray[0];
+ if (intersectArray) {
+ return intersectArray[0];
+ }
}
};
@@ -23979,8 +23973,7 @@ OG.renderer.RaphaelRenderer.prototype.drawGuide = function (element) {
controller.action(event, element);
}, 10);
})
- }
- else if (controller.create) {
+ } else if (controller.create) {
if (!guide.rect) {
guide.rect = [];
}
@@ -24030,6 +24023,50 @@ OG.renderer.RaphaelRenderer.prototype.drawGuide = function (element) {
controllers.push(_trash);
}
+ //20210421
+ // function _drawRotate(angle) {
+ // if (!_isDeletable) {
+ // return;
+ // }
+ // _rotate = me._PAPER.image(me._CONFIG.IMAGE_BASE + 'rotate.png', 0, 0, _ctrlSize, _ctrlSize);
+ // _rotate.attr(me._CONFIG.DEFAULT_STYLE.GUIDE_LINE_AREA);
+ // group.appendChild(_rotate);
+ // me._add(_rotate, rElement.id + OG.Constants.GUIDE_SUFFIX.ROTATE);
+ // guide.rotate = _rotate.node;
+ //
+ //
+ // $(_rotate.node).click(function () {
+ // if (me.isLane(element)) {
+ // me.removeLaneShape(element);
+ // me.addHistory();
+ // } else {
+ //
+ // console.log(rElement,element)
+ // // me.rotate(element, 330)
+ // //Rotate 클릭 구분
+ // // console.log(rElement)
+ // if (rElement.attrs.cursor == 'move') {
+ // me.rotate(element, 330)
+ // rElement.attrs.cursor = 'default'
+ // } else if (rElement.attrs.cursor == 'default') {
+ // me.rotate(element, 0)
+ // rElement.attrs.cursor = 'move'
+ //
+ // }
+ // // me.addHistory();
+ // }
+ // })
+ // controllers.push(_rotate);
+ // }
+ //
+ // function _redrawRotate() {
+ // if (!_isDeletable) {
+ // return;
+ // }
+ // _rotate = me._getREleById(rElement.id + OG.Constants.GUIDE_SUFFIX.ROTATE);
+ // controllers.push(_rotate);
+ // }
+
function _drawLine() {
if (!_isConnectable) {
return;
@@ -24293,7 +24330,7 @@ OG.renderer.RaphaelRenderer.prototype.drawGuide = function (element) {
x = _upperRight.x + ((divide + 1) * (_ctrlMargin + _ctrlSize) - _ctrlSize);
y = _upperRight.y + (rest * (_ctrlMargin + _ctrlSize));
- if(!controller) return;
+ if (!controller) return;
controller.attr({x: x, y: y});
@@ -24357,6 +24394,8 @@ OG.renderer.RaphaelRenderer.prototype.drawGuide = function (element) {
}
}
_redrawTrash();
+ //20210421
+ // _redrawRotate();
}
if (isEdge) {
_redrawBbox();
@@ -24377,6 +24416,8 @@ OG.renderer.RaphaelRenderer.prototype.drawGuide = function (element) {
_drawGroup();
_drawBbox();
_drawGuide();
+ //20210421
+ // _drawRotate();
if (isLane) {
_drawLaneQuarter(me.enableDivideCount(element));
@@ -26204,34 +26245,33 @@ OG.renderer.RaphaelRenderer.prototype.trimEdge = function (element) {
var me = this, rElement = this._getREleById(OG.Util.isElement(element) ? element.id : element),
geometry = rElement ? rElement.node.shape.geom : null;
- var vertices = geometry.getVertices();
- var orgVerticesLength = vertices.length;
-
- //Edge Element 내부의 패스중 나열된 세 꼭지점이 평행에 가까울 경우 하나의 선분으로 정리한다.
- for (var i = vertices.length; i--;) {
- if (i < vertices.length - 1 && vertices[i - 1]) {
- var angleBetweenThreePoints =
- geometry.angleBetweenThreePoints(vertices[i + 1], vertices[i], vertices[i - 1]);
-
- if (vertices[i + 1].x === vertices[i].x && vertices[i + 1].y === vertices[i].y) {
- vertices.splice(i, 1);
- }
- else if (vertices[i].x === vertices[i - 1].x && vertices[i].y === vertices[i - 1].y) {
- vertices.splice(i, 1);
- }
-
- else if (angleBetweenThreePoints >= me._CONFIG.TRIM_EDGE_ANGLE_SIZE) {
- vertices.splice(i, 1);
- }
+ if (geometry) {
+ var vertices = geometry.getVertices();
+ var orgVerticesLength = vertices.length;
+
+ //Edge Element 내부의 패스중 나열된 세 꼭지점이 평행에 가까울 경우 하나의 선분으로 정리한다.
+ for (var i = vertices.length; i--;) {
+ if (i < vertices.length - 1 && vertices[i - 1]) {
+ var angleBetweenThreePoints =
+ geometry.angleBetweenThreePoints(vertices[i + 1], vertices[i], vertices[i - 1]);
+
+ if (vertices[i + 1].x === vertices[i].x && vertices[i + 1].y === vertices[i].y) {
+ vertices.splice(i, 1);
+ } else if (vertices[i].x === vertices[i - 1].x && vertices[i].y === vertices[i - 1].y) {
+ vertices.splice(i, 1);
+ } else if (angleBetweenThreePoints >= me._CONFIG.TRIM_EDGE_ANGLE_SIZE) {
+ vertices.splice(i, 1);
+ }
+ }
+ }
+ if (orgVerticesLength !== vertices.length) {
+ element.shape.geom.setVertices(vertices);
+ element = me.drawEdge(new OG.PolyLine(vertices), element.shape.geom.style, element.id);
+ me.drawLabel(element);
+ me.drawEdgeLabel(element, null, 'FROM');
+ me.drawEdgeLabel(element, null, 'TO');
}
}
- if (orgVerticesLength !== vertices.length) {
- element.shape.geom.setVertices(vertices);
- element = me.drawEdge(new OG.PolyLine(vertices), element.shape.geom.style, element.id);
- me.drawLabel(element);
- me.drawEdgeLabel(element, null, 'FROM');
- me.drawEdgeLabel(element, null, 'TO');
- }
}
/**
@@ -26246,117 +26286,119 @@ OG.renderer.RaphaelRenderer.prototype.trimConnectInnerVertice = function (elemen
geometry = rElement ? rElement.node.shape.geom : null,
from, to, fromShape, toShape, fromXY, toXY;
- var vertices = geometry.getVertices();
- from = $(element).attr("_from");
- to = $(element).attr("_to");
-
- if (from) {
- fromShape = this._getShapeFromTerminal(from);
- fromXY = this._getPositionFromTerminal(from);
- }
-
- if (to) {
- toShape = this._getShapeFromTerminal(to);
- toXY = this._getPositionFromTerminal(to);
- }
-
- //Edge Element의 연결 정보가 있을 경우 연결대상과 꼭지점의 다중 중복을 정리한다.
- var startVertice;
- var startVerticeIdx;
- var firstExternalVertice;
- var firstExternalVerticeIdx;
- var lastExcludeVertice;
- var lastExcludeVerticeIdx;
- var caculateExternalVerticeLine = function () {
- if (firstExternalVertice) {
- if (firstExternalVerticeIdx > 0 && firstExternalVerticeIdx < vertices.length - 1) {
- var angleBetweenPoints = geometry.isRightAngleBetweenPoints(firstExternalVertice, lastExcludeVertice);
- if (angleBetweenPoints.flag) {
- if (angleBetweenPoints.type === 'horizontal') {
- vertices[firstExternalVerticeIdx].y = vertices[startVerticeIdx].y;
- }
- if (angleBetweenPoints.type === 'vertical') {
- vertices[firstExternalVerticeIdx].x = vertices[startVerticeIdx].x;
+ if (geometry) {
+ var vertices = geometry.getVertices();
+ from = $(element).attr("_from");
+ to = $(element).attr("_to");
+
+ if (from) {
+ fromShape = this._getShapeFromTerminal(from);
+ fromXY = this._getPositionFromTerminal(from);
+ }
+
+ if (to) {
+ toShape = this._getShapeFromTerminal(to);
+ toXY = this._getPositionFromTerminal(to);
+ }
+
+ //Edge Element의 연결 정보가 있을 경우 연결대상과 꼭지점의 다중 중복을 정리한다.
+ var startVertice;
+ var startVerticeIdx;
+ var firstExternalVertice;
+ var firstExternalVerticeIdx;
+ var lastExcludeVertice;
+ var lastExcludeVerticeIdx;
+ var caculateExternalVerticeLine = function () {
+ if (firstExternalVertice) {
+ if (firstExternalVerticeIdx > 0 && firstExternalVerticeIdx < vertices.length - 1) {
+ var angleBetweenPoints = geometry.isRightAngleBetweenPoints(firstExternalVertice, lastExcludeVertice);
+ if (angleBetweenPoints.flag) {
+ if (angleBetweenPoints.type === 'horizontal') {
+ vertices[firstExternalVerticeIdx].y = vertices[startVerticeIdx].y;
+ }
+ if (angleBetweenPoints.type === 'vertical') {
+ vertices[firstExternalVerticeIdx].x = vertices[startVerticeIdx].x;
+ }
}
}
- }
- if (startVerticeIdx === 0) {
- vertices.splice(startVerticeIdx + 1, firstExternalVerticeIdx - (startVerticeIdx + 1));
- }
- if (startVerticeIdx === vertices.length - 1) {
- vertices.splice(firstExternalVerticeIdx + 1, startVerticeIdx - (firstExternalVerticeIdx + 1));
+ if (startVerticeIdx === 0) {
+ vertices.splice(startVerticeIdx + 1, firstExternalVerticeIdx - (startVerticeIdx + 1));
+ }
+ if (startVerticeIdx === vertices.length - 1) {
+ vertices.splice(firstExternalVerticeIdx + 1, startVerticeIdx - (firstExternalVerticeIdx + 1));
+ }
}
}
- }
- if (fromShape) {
- for (var i = 0, leni = vertices.length; i < leni; i++) {
- if (i == 0) {
- startVertice = vertices[i];
- startVerticeIdx = i;
- continue;
- }
- var containsPoint = fromShape.shape.geom.isContainsPoint(vertices[i]);
- if (containsPoint) {
- if (i == (vertices.length - 1)) {
- firstExternalVertice = vertices[i];
- firstExternalVerticeIdx = i;
- lastExcludeVertice = vertices[i - 1];
- lastExcludeVerticeIdx = i - 1;
- } else {
- firstExternalVertice = vertices[i + 1];
- firstExternalVerticeIdx = i + 1;
- lastExcludeVertice = vertices[i];
- lastExcludeVerticeIdx = i;
- }
- }
- }
- caculateExternalVerticeLine();
- startVertice = null;
- startVerticeIdx = null;
- firstExternalVertice = null;
- firstExternalVerticeIdx = null;
- lastExcludeVertice = null;
- lastExcludeVerticeIdx = null;
- }
- if (toShape) {
- for (var i = vertices.length - 1; i >= 0; i--) {
- if (i == vertices.length - 1) {
- startVertice = vertices[i];
- startVerticeIdx = i;
- continue;
- }
- var containsPoint = toShape.shape.geom.isContainsPoint(vertices[i]);
- if (containsPoint) {
+ if (fromShape) {
+ for (var i = 0, leni = vertices.length; i < leni; i++) {
if (i == 0) {
- firstExternalVertice = vertices[i];
- firstExternalVerticeIdx = i;
- lastExcludeVertice = vertices[i + 1];
- lastExcludeVerticeIdx = i + 1;
- } else {
- firstExternalVertice = vertices[i - 1];
- firstExternalVerticeIdx = i - 1;
- lastExcludeVertice = vertices[i];
- lastExcludeVerticeIdx = i;
+ startVertice = vertices[i];
+ startVerticeIdx = i;
+ continue;
+ }
+ var containsPoint = fromShape.shape.geom.isContainsPoint(vertices[i]);
+ if (containsPoint) {
+ if (i == (vertices.length - 1)) {
+ firstExternalVertice = vertices[i];
+ firstExternalVerticeIdx = i;
+ lastExcludeVertice = vertices[i - 1];
+ lastExcludeVerticeIdx = i - 1;
+ } else {
+ firstExternalVertice = vertices[i + 1];
+ firstExternalVerticeIdx = i + 1;
+ lastExcludeVertice = vertices[i];
+ lastExcludeVerticeIdx = i;
+ }
+ }
+ }
+ caculateExternalVerticeLine();
+ startVertice = null;
+ startVerticeIdx = null;
+ firstExternalVertice = null;
+ firstExternalVerticeIdx = null;
+ lastExcludeVertice = null;
+ lastExcludeVerticeIdx = null;
+ }
+ if (toShape) {
+ for (var i = vertices.length - 1; i >= 0; i--) {
+ if (i == vertices.length - 1) {
+ startVertice = vertices[i];
+ startVerticeIdx = i;
+ continue;
+ }
+ var containsPoint = toShape.shape.geom.isContainsPoint(vertices[i]);
+ if (containsPoint) {
+ if (i == 0) {
+ firstExternalVertice = vertices[i];
+ firstExternalVerticeIdx = i;
+ lastExcludeVertice = vertices[i + 1];
+ lastExcludeVerticeIdx = i + 1;
+ } else {
+ firstExternalVertice = vertices[i - 1];
+ firstExternalVerticeIdx = i - 1;
+ lastExcludeVertice = vertices[i];
+ lastExcludeVerticeIdx = i;
+ }
}
}
+ caculateExternalVerticeLine();
}
- caculateExternalVerticeLine();
- }
-
- //다중 중복 정리 후 Edge 의 모양이 직선인 경우 새로운 plain 을 제작한다.
- if (vertices.length === 2) {
- element = me.drawEdge(new OG.Line(vertices[0], vertices[1]), element.shape.geom.style, element.id);
- element = me.trimEdgeDirection(element, fromShape, toShape);
- } else {
- element.shape.geom.setVertices(vertices);
- element = me.drawEdge(new OG.PolyLine(vertices), element.shape.geom.style, element.id);
+
+ //다중 중복 정리 후 Edge 의 모양이 직선인 경우 새로운 plain 을 제작한다.
+ if (vertices.length === 2) {
+ element = me.drawEdge(new OG.Line(vertices[0], vertices[1]), element.shape.geom.style, element.id);
+ element = me.trimEdgeDirection(element, fromShape, toShape);
+ } else {
+ element.shape.geom.setVertices(vertices);
+ element = me.drawEdge(new OG.PolyLine(vertices), element.shape.geom.style, element.id);
+ }
+
+ me.drawLabel(element);
+ me.drawEdgeLabel(element, null, 'FROM');
+ me.drawEdgeLabel(element, null, 'TO');
+
+ return element;
}
-
- me.drawLabel(element);
- me.drawEdgeLabel(element, null, 'FROM');
- me.drawEdgeLabel(element, null, 'TO');
-
- return element;
}
/**
@@ -26369,54 +26411,56 @@ OG.renderer.RaphaelRenderer.prototype.trimConnectIntersection = function (elemen
var me = this, rElement = this._getREleById(OG.Util.isElement(element) ? element.id : element),
geometry = rElement ? rElement.node.shape.geom : null,
from, to, fromShape, toShape, fromXY, toXY, shortestIntersection;
+
+ if (geometry) {
+ var vertices = geometry.getVertices();
+ from = $(element).attr("_from");
+ to = $(element).attr("_to");
- var vertices = geometry.getVertices();
- from = $(element).attr("_from");
- to = $(element).attr("_to");
-
- if (from) {
- fromShape = this._getShapeFromTerminal(from);
- fromXY = this._getPositionFromTerminal(from);
- }
+ if (from) {
+ fromShape = this._getShapeFromTerminal(from);
+ fromXY = this._getPositionFromTerminal(from);
+ }
- if (to) {
- toShape = this._getShapeFromTerminal(to);
- toXY = this._getPositionFromTerminal(to);
- }
- //Edge Element의 연결 정보가 있을 경우 선분과 연결대상의 연결점을 자연스럽게 한다.
- if (from) {
- shortestIntersection =
- fromShape.shape.geom.shortestIntersectToLine([vertices[1], [fromXY.x, fromXY.y]]);
+ if (to) {
+ toShape = this._getShapeFromTerminal(to);
+ toXY = this._getPositionFromTerminal(to);
+ }
+ //Edge Element의 연결 정보가 있을 경우 선분과 연결대상의 연결점을 자연스럽게 한다.
+ if (from) {
+ shortestIntersection =
+ fromShape.shape.geom.shortestIntersectToLine([vertices[1], [fromXY.x, fromXY.y]]);
- if (shortestIntersection) {
- vertices[0].x = shortestIntersection.x
- vertices[0].y = shortestIntersection.y
- } else {
- vertices[0].x = fromXY.x
- vertices[0].y = fromXY.y
+ if (shortestIntersection) {
+ vertices[0].x = shortestIntersection.x
+ vertices[0].y = shortestIntersection.y
+ } else {
+ vertices[0].x = fromXY.x
+ vertices[0].y = fromXY.y
+ }
}
- }
- if (to) {
- shortestIntersection =
- toShape.shape.geom.shortestIntersectToLine([vertices[vertices.length - 2], [toXY.x, toXY.y]]);
+ if (to) {
+ shortestIntersection =
+ toShape.shape.geom.shortestIntersectToLine([vertices[vertices.length - 2], [toXY.x, toXY.y]]);
- if (shortestIntersection) {
- vertices[vertices.length - 1].x = shortestIntersection.x
- vertices[vertices.length - 1].y = shortestIntersection.y
- } else {
- vertices[vertices.length - 1].x = toXY.x
- vertices[vertices.length - 1].y = toXY.y
+ if (shortestIntersection) {
+ vertices[vertices.length - 1].x = shortestIntersection.x
+ vertices[vertices.length - 1].y = shortestIntersection.y
+ } else {
+ vertices[vertices.length - 1].x = toXY.x
+ vertices[vertices.length - 1].y = toXY.y
+ }
}
- }
- element.shape.geom.setVertices(vertices);
- element = me.drawEdge(new OG.PolyLine(vertices), element.shape.geom.style, element.id);
- me.drawLabel(element);
- me.drawEdgeLabel(element, null, 'FROM');
- me.drawEdgeLabel(element, null, 'TO');
+ element.shape.geom.setVertices(vertices);
+ element = me.drawEdge(new OG.PolyLine(vertices), element.shape.geom.style, element.id);
+ me.drawLabel(element);
+ me.drawEdgeLabel(element, null, 'FROM');
+ me.drawEdgeLabel(element, null, 'TO');
- return element;
+ return element;
+ }
}
/**
@@ -29353,6 +29397,47 @@ OG.handler.EventHandler.prototype = {
// 이동 처리
$(this).css({"position": "", "left": "", "top": ""});
+
+ // if element has some customeAction, do it instead.
+
+ $.each(bBoxArray, function (k, item) {
+ var ele = renderer.getElementById(item.id);
+ if (ele.customMoveAction) {
+ ele.customMoveAction(dx, dy, null, null, null, null, null, null);
+ }
+
+ if (renderer.isGroup(ele)) {
+ $.each(renderer.getInnerShapesOfGroup(ele), function (idx, innerShape) {
+ if (innerShape.customMoveAction) {
+ // inner BC
+ // innerShape.customMoveAction(dx, dy, null, null, null, null, null, null, true);
+ innerShape.customMoveAction(dx, dy, null, null, null, null, null, null);
+ }
+ });
+ }
+ });
+
+ // $.each(bBoxArray, function (k, item) {
+ // var ele = renderer.getElementById(item.id);
+ //
+ // if (ele.customMoveAction) {
+ //
+ // if (renderer.isGroup(ele)) {
+ // $.each(renderer.getInnerShapesOfGroup(ele), function (idx, innerShape) {
+ // var ele = renderer.getElementById(innerShape.id);
+ // // me.group()
+ // if (ele.customMoveAction) {
+ // ele.customMoveAction(dx, dy, null, null, null, null, null, null)
+ // }
+ //
+ // });
+ // } else {
+ // ele.customMoveAction(dx, dy, null, null, null, null, null, null);
+ // }
+ // }
+ //
+ // });
+
eleArray = me._moveElements(bBoxArray, dx, dy);
$(root).removeData("bBoxArray");
@@ -29391,6 +29476,7 @@ OG.handler.EventHandler.prototype = {
}
});
+
renderer.removeAllConnectGuide();
renderer.toFrontEdges();
renderer.checkAllBridgeEdge();
@@ -30297,6 +30383,16 @@ OG.handler.EventHandler.prototype = {
stDu, stDlw, stDl, stDr;
$(this).css({"position": "absolute", "left": "0px", "top": "0px"});
+
+ //RESIZE_TEST
+ $.each(me._getSelectedElement(), function (k, item) {
+ var ele = renderer.getElementById(item.id);
+ if (ele.customMoveAction) {
+ ele.customMoveAction(null, null, newWidth, newHeight, du, dlw, dl, dr);
+ }
+ });
+
+
if (element && element.shape.geom) {
if (renderer.isLane(element)) {
renderer.resizeLane(element, [du, dlw, dl, dr]);
@@ -30645,7 +30741,7 @@ OG.handler.EventHandler.prototype = {
//터치패드 이벤트와 마우스 휠 스피드의 차이는 매우 크다.
//터치패드 0~10, 마우스 휠 400 이상.
- if(!event.shiftKey) return;
+ if (!event.shiftKey) return;
var deltaX = 0;
var deltaY = 0;
@@ -30666,8 +30762,7 @@ OG.handler.EventHandler.prototype = {
if (event.originalEvent.wheelDelta > 0 || event.deltaY > 0) {
// scroll up
updateScale(event, true);
- }
- else {
+ } else {
updateScale(event, false);
}
}
@@ -30677,8 +30772,7 @@ OG.handler.EventHandler.prototype = {
if (event.originalEvent.wheelDelta > 0 || event.deltaY > 0) {
// scroll up
updateScale(event, true);
- }
- else {
+ } else {
updateScale(event, false);
}
}
@@ -32191,20 +32285,15 @@ OG.handler.EventHandler.prototype = {
if (key) {
if (key == 'delete') {
return this.makeDelete();
- }
- else if (key == 'copy') {
+ } else if (key == 'copy') {
return this.makeCopy();
- }
- else if (key == 'format') {
+ } else if (key == 'format') {
return this.makeFormat();
- }
- else if (key == 'text') {
+ } else if (key == 'text') {
return this.makeFont();
- }
- else if (key == 'bringToFront') {
+ } else if (key == 'bringToFront') {
return this.makeBring();
- }
- else if (key == 'sendToBack') {
+ } else if (key == 'sendToBack') {
return this.makeSend();
}
} else {
@@ -32979,14 +33068,11 @@ OG.handler.EventHandler.prototype = {
//아래 위 라인에는 5개씩 양 옆라인에는 3개씩
if (item.shape.Events.length < 6) {
newElement = me._RENDERER._CANVAS.drawShape([boundary.getLowerLeft().x + (((boundary.getLowerRight().x - boundary.getLowerLeft().x) / 6) * (item.shape.Events.length)), boundary.getLowerCenter().y], shape, [30, 30]);
- }
- else if (item.shape.Events.length < 9) {
+ } else if (item.shape.Events.length < 9) {
newElement = me._RENDERER._CANVAS.drawShape([boundary.getLowerRight().x, boundary.getLowerRight().y - (((boundary.getLowerRight().y - boundary.getUpperRight().y) / 4) * (item.shape.Events.length - 5))], shape, [30, 30]);
- }
- else if (item.shape.Events.length < 14) {
+ } else if (item.shape.Events.length < 14) {
newElement = me._RENDERER._CANVAS.drawShape([boundary.getUpperRight().x - (((boundary.getUpperRight().x - boundary.getUpperLeft().x) / 6) * (item.shape.Events.length - 8)), boundary.getUpperCenter().y], shape, [30, 30]);
- }
- else if (item.shape.Events.length < 17) {
+ } else if (item.shape.Events.length < 17) {
newElement = me._RENDERER._CANVAS.drawShape([boundary.getUpperLeft().x, boundary.getUpperLeft().y - (((boundary.getUpperLeft().y - boundary.getLowerLeft().y) / 4) * (item.shape.Events.length - 13))], shape, [30, 30]);
}
@@ -33650,6 +33736,11 @@ OG.handler.EventHandler.prototype = {
return me._CONFIG.CONNECTABLE && shape.CONNECTABLE;
},
+ _isRotateable: function (shape) {
+ var me = this;
+ return (me._CONFIG.SELECTABLE && shape.SELECTABLE) &&
+ (me._CONFIG.ROTATEABLE && shape.ROTATEABLE);
+ },
_isConnectableFrom: function (shape) {
var me = this;
return shape.ENABLE_FROM;
@@ -33815,13 +33906,13 @@ OG.handler.EventHandler.prototype = {
//vertical boundary range
correctionConditions.push({
condition: {
- minX: upperLeft.x + ( width / 2) - delay,
- maxX: upperLeft.x + ( width / 2) + delay,
+ minX: upperLeft.x + (width / 2) - delay,
+ maxX: upperLeft.x + (width / 2) + delay,
minY: upperLeft.y,
maxY: upperLeft.y + height,
},
fixedPosition: {
- x: upperLeft.x + ( width / 2)
+ x: upperLeft.x + (width / 2)
},
id: idx
});
@@ -33831,11 +33922,11 @@ OG.handler.EventHandler.prototype = {
condition: {
minX: upperLeft.x,
maxX: upperLeft.x + width,
- minY: upperLeft.y + ( height / 2) - delay,
- maxY: upperLeft.y + ( height / 2) + delay,
+ minY: upperLeft.y + (height / 2) - delay,
+ maxY: upperLeft.y + (height / 2) + delay,
},
fixedPosition: {
- y: upperLeft.y + ( height / 2)
+ y: upperLeft.y + (height / 2)
},
id: idx
});
@@ -34114,6 +34205,12 @@ OG.handler.EventHandler.prototype = {
vertices[index].x = newX;
vertices[index].y = newY;
+ var ele = renderer.getElementById(element.id);
+ if (ele.customRelationMoveAction) {
+ console.log('#### OG vertices:', vertices)
+ ele.customRelationMoveAction(vertices);
+ }
+
renderer.drawEdge(new OG.PolyLine(vertices), element.shape.geom.style, element.id);
renderer.removeConnectGuide(element);
@@ -34451,6 +34548,12 @@ OG.handler.EventHandler.prototype = {
renderer.setAttr(spot, {y: newY - (height / 2)});
}
}
+
+ var ele = renderer.getElementById(element.id);
+ if (ele.customRelationMoveAction) {
+ ele.customRelationMoveAction(vertices);
+ }
+
renderer.drawEdge(new OG.PolyLine(vertices), element.shape.geom.style, element.id);
renderer.removeConnectGuide(element);
renderer.removeVirtualSpot(element);
@@ -34466,11 +34569,13 @@ OG.handler.EventHandler.prototype = {
var isConnectable = me._isConnectable(frontElement.shape);
if (isConnectable) {
if (connectableDirection === 'from') {
+ console.log('from')
if (me._isConnectableFrom(frontElement.shape)) {
renderer.connect(terminal, null, element, element.shape.geom.style);
}
}
if (connectableDirection === 'to') {
+ console.log('to')
if (me._isConnectableTo(frontElement.shape)) {
renderer.connect(null, terminal, element, element.shape.geom.style);
}
@@ -35141,6 +35246,10 @@ OG.graph.Canvas = function (container, containerSize, backgroundColor, backgroun
EDGE: true,
GROUP: true
},
+ /**
+ * 가이드에 회전 컨트롤러 여부
+ */
+ ROTATEABLE: false,
/**
* 가이드에 삭제 컨트롤러 여부
@@ -35950,7 +36059,7 @@ OG.graph.Canvas.prototype = {
var sliderParent;
var expandBtn;
var container = me._CONTAINER;
- console.log(container)
+ // console.log(container)
if (!option.slider) {
return;
}
@@ -35998,16 +36107,16 @@ OG.graph.Canvas.prototype = {
// }
// });
- sliderBarWrapper = $('');
+ sliderBarWrapper = $('');
sliderBarWrapper.css({
- position: 'relative',
- width: '100%'
});
sliderText = $('');
- sliderBar = $('');
+ sliderBar = $('');
sliderBar.bind('change', function () {
+
me.updateSlider($(this).val());
+ // me.updateSlider(option.sliderLocation);
});
sliderBar.bind('input', function () {
me.updateSlider($(this).val());
@@ -36015,7 +36124,6 @@ OG.graph.Canvas.prototype = {
sliderBar.css({
position: 'relative',
//'writing-mode': 'bt-lr', /* IE */
- 'width': '100%',
'height': '8px'
});
@@ -36154,7 +36262,11 @@ OG.graph.Canvas.prototype = {
//슬라이더를 캔버스에 등록
this._CONFIG.SLIDER = slider;
- //슬라이더 업데이트
+ //슬라이더 업데이트 돋보기
+ if (option.sliderLocationScale) {
+ this._CONFIG.SCALE = option.sliderLocationScale
+ }
+
this.updateSlider(this._CONFIG.SCALE * 100);
},
@@ -36206,9 +36318,11 @@ OG.graph.Canvas.prototype = {
if (!this._CONFIG.SLIDER) {
return;
}
+ // console.log('updateSlider:: ',val, this._CONFIG.SCALE)
if (!val) {
val = this._CONFIG.SCALE * 100;
}
+ this.sliderLocationScale = this._CONFIG.SCALE
var slider = this._CONFIG.SLIDER;
var sliderText = slider.find('.scaleSliderText');
@@ -36396,7 +36510,8 @@ OG.graph.Canvas.prototype = {
* @return {Element} Group DOM Element with geometry
*/
drawTransformer: function (position, label, inputs, outputs, drawData, id) {
- var me = this, shape, element, style, envelope, i, toShape, fromShape, toElement, fromElement, textShape, textElement;
+ var me = this, shape, element, style, envelope, i, toShape, fromShape, toElement, fromElement, textShape,
+ textElement;
shape = new OG.shape.Transformer(label);
if (!Array.isArray(inputs) || !Array.isArray(outputs)) {
@@ -37481,7 +37596,8 @@ OG.graph.Canvas.prototype = {
var canvasWidth, canvasHeight, rootGroup, canvasScale,
minX = Number.MAX_VALUE, minY = Number.MAX_VALUE, maxX = Number.MIN_VALUE, maxY = Number.MIN_VALUE,
i, cell, shape, id, parent, shapeType, shapeId, x, y, width, height, style, geom, from, to,
- fromEdge, toEdge, label, fromLabel, toLabel, angle, value, data, dataExt, element, loopType, taskType, swimlane, textList;
+ fromEdge, toEdge, label, fromLabel, toLabel, angle, value, data, dataExt, element, loopType, taskType,
+ swimlane, textList;
this._RENDERER.clear();
var renderer = this._RENDERER;
diff --git a/src/App.vue b/src/App.vue
index 47fc025..ed0bc0e 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -1,28 +1,49 @@