JavaScriptを色々あれこれしようとするがひたすら失敗を繰り返している
| Revision | 37 (tree) |
|---|---|
| Time | 2016-12-02 03:26:59 |
| Author | |
(empty log message)
| @@ -130,7 +130,9 @@ | ||
| 130 | 130 | |
| 131 | 131 | /* フォーカス枠と拡大縮小・回転用マーカー定義 */ |
| 132 | 132 | .scaler, |
| 133 | - .roller { | |
| 133 | + .roller, | |
| 134 | + .mirrorLR, | |
| 135 | + .mirrorUD { | |
| 134 | 136 | position: absolute; |
| 135 | 137 | width: 15px; height: 15px; |
| 136 | 138 | padding: 0; margin: 0; |
| @@ -147,6 +149,16 @@ | ||
| 147 | 149 | transform: translateX(-50%) translateY(-50%); |
| 148 | 150 | background-color: green; |
| 149 | 151 | } |
| 152 | + .mirrorLR { | |
| 153 | + left: 0%; top: 0%; | |
| 154 | + transform: translateX(-50%) translateY(-50%); | |
| 155 | + background-color: lightpink; | |
| 156 | + } | |
| 157 | + .mirrorUD { | |
| 158 | + left: 100%; top:0%; | |
| 159 | + transform: translateX(-50%) translateY(-50%); | |
| 160 | + background-color: aquamarine; | |
| 161 | + } | |
| 150 | 162 | |
| 151 | 163 | .focusimage { |
| 152 | 164 | background-image: linear-gradient( |
| @@ -120,7 +120,7 @@ | ||
| 120 | 120 | this.cmdCreateResponse( cmdObj ); |
| 121 | 121 | |
| 122 | 122 | // Undo情報作成 |
| 123 | - this.createUndoInfo( cmdObj ); | |
| 123 | +// this.createUndoInfo( cmdObj ); | |
| 124 | 124 | |
| 125 | 125 | // cmdの宛先によりcmd送信処理分け |
| 126 | 126 | eachDestOfFuncTbl[ cmdObj.to ]( cmdObj ); |
| @@ -28,6 +28,8 @@ | ||
| 28 | 28 | movebox: 10, |
| 29 | 29 | scalebox: 11, |
| 30 | 30 | rollbox: 12, |
| 31 | + mirrorlr: 13, | |
| 32 | + mirrorud: 14, | |
| 31 | 33 | deletebox: 100, |
| 32 | 34 | }; |
| 33 | 35 |
| @@ -22,6 +22,8 @@ | ||
| 22 | 22 | this.originalHeight = 0.0; |
| 23 | 23 | this.opacity = 1.0; |
| 24 | 24 | this.degree = 0; |
| 25 | + this.mirrorLRdeg = 0; | |
| 26 | + this.mirrorUDdeg = 0; | |
| 25 | 27 | this.text = null; |
| 26 | 28 | this.transformStr = null; |
| 27 | 29 |
| @@ -110,7 +112,9 @@ | ||
| 110 | 112 | this.DOMbase = document.createElement('div'); |
| 111 | 113 | this.DOMbase.classList.add('DispBase'); |
| 112 | 114 | this.DOMbase.dataset.objid = this.ObjID; |
| 113 | - this.DOMbase.dataset.degree = 0; | |
| 115 | + this.DOMbase.dataset.degree = this.degree; | |
| 116 | + this.DOMbase.dataset.mirrorlr = this.mirrorLRdeg; | |
| 117 | + this.DOMbase.dataset.mirrorud = this.mirrorUDdeg; | |
| 114 | 118 | this.DOMbase.addEventListener('mousedown', this.onMouseDown.bind(this), false); |
| 115 | 119 | // DispObj作成 |
| 116 | 120 | let elType = (null != type.match(/imagebox/)) ? 'img' : 'div'; |
| @@ -213,6 +217,8 @@ | ||
| 213 | 217 | this.height = parseInt(ele.style.height); |
| 214 | 218 | this.ObjID = ele.dataset.objid; |
| 215 | 219 | this.degree = ele.dataset.degree; |
| 220 | + this.mirrorLRdeg = ele.dataset.mirrorlr; | |
| 221 | + this.mirrorUDdeg = ele.dataset.mirrorud; | |
| 216 | 222 | this.DOMbase.addEventListener('mousedown', this.onMouseDown.bind(this), false); |
| 217 | 223 | |
| 218 | 224 | if( ele.children.length < 1 ){ |
| @@ -277,11 +283,20 @@ | ||
| 277 | 283 | window.renderLoop.requestRenderFunc(this.renderrollbox.bind(this)); |
| 278 | 284 | } |
| 279 | 285 | renderrollbox() { |
| 280 | - this.DOMbase.style.transform = 'rotateZ(' + this.degree + 'deg);'; | |
| 286 | + this.DOMbase.style.transform = 'rotateY(' + this.mirrorLRdeg + 'deg) rotateX(' + this.mirrorUDdeg + 'deg) rotateZ(' + this.degree + 'deg);'; | |
| 281 | 287 | } |
| 288 | + mirrorLR() { | |
| 289 | + this.mirrorLRdeg = (0 < this.mirrorLRdeg) ? 0 : 180; | |
| 290 | + this.DOMbase.dataset.mirrorlr = this.mirrorLRdeg; | |
| 291 | + window.renderLoop.requestRenderFunc(this.renderrollbox.bind(this)); | |
| 292 | + } | |
| 293 | + mirrorUD() { | |
| 294 | + this.mirrorUDdeg = (0 < this.mirrorUDdeg) ? 0 : 180; | |
| 295 | + this.DOMbase.dataset.mirrorud = this.mirrorUDdeg; | |
| 296 | + window.renderLoop.requestRenderFunc(this.renderrollbox.bind(this)); | |
| 297 | + } | |
| 282 | 298 | |
| 283 | 299 | |
| 284 | - | |
| 285 | 300 | checkType(str) { |
| 286 | 301 | return true; |
| 287 | 302 | } |
| @@ -133,6 +133,19 @@ | ||
| 133 | 133 | } |
| 134 | 134 | } |
| 135 | 135 | |
| 136 | + mirrorLR(id) { | |
| 137 | + this.debuglog('mirrorLR id=' + id); | |
| 138 | + if (id < this.ObjIDLen) { | |
| 139 | + this.ObjIDarray[id].mirrorLR(); | |
| 140 | + } | |
| 141 | + } | |
| 142 | + mirrorUD(id) { | |
| 143 | + this.debuglog('mirrorUD id=' + id); | |
| 144 | + if (id < this.ObjIDLen) { | |
| 145 | + this.ObjIDarray[id].mirrorUD(); | |
| 146 | + } | |
| 147 | + } | |
| 148 | + | |
| 136 | 149 | deletebox(id) { |
| 137 | 150 | // 要素を画面から隠す。削除はしない。Undoに対応するため。 |
| 138 | 151 | // 要素を DOM treeから 切り離すことで表示されないようにする |
| @@ -16,6 +16,8 @@ | ||
| 16 | 16 | this.DOM = [null, null, null, null]; // focus表示用 |
| 17 | 17 | this.domScaler = null; |
| 18 | 18 | this.domRoller = null; |
| 19 | + this.domMirrorLR = null; | |
| 20 | + this.domMirrorUD = null; | |
| 19 | 21 | } |
| 20 | 22 | |
| 21 | 23 | debuglog(str) { |
| @@ -33,14 +35,16 @@ | ||
| 33 | 35 | this.DOM[cnt].dataset.objid = this.num2str[cnt]; |
| 34 | 36 | this.DOM[cnt].classList.add('focusimage'); |
| 35 | 37 | this.DOM[cnt].classList.add(this.num2str[cnt]); |
| 36 | - window.renderLoop.requestRenderFunc(this.renderCreateOneFocusbar.bind(this, this.DOM[cnt], null)); | |
| 38 | + window.renderLoop.requestRenderFunc(this.renderCreateForcus.bind(this, this.DOM[cnt])); | |
| 37 | 39 | } |
| 38 | 40 | // this.debuglog("create() renderFunc size=" + this.renderFunc.size()); |
| 39 | 41 | |
| 40 | 42 | this.createScaler(); |
| 41 | 43 | this.createRoller(); |
| 44 | + this.createMirrorLR(); | |
| 45 | + this.createMirrorUD(); | |
| 42 | 46 | } |
| 43 | - renderCreateOneFocusbar(dom, rect) { | |
| 47 | + renderCreateForcus(dom) { | |
| 44 | 48 | dom.style.display = (null == this.clingingPartner) ? "none" : "block"; |
| 45 | 49 | this.clingingPartner.appendChild(dom); |
| 46 | 50 | } |
| @@ -51,26 +55,35 @@ | ||
| 51 | 55 | this.domScaler = document.createElement('div'); |
| 52 | 56 | this.domScaler.dataset.objid = 'scaler'; |
| 53 | 57 | this.domScaler.classList.add('scaler'); |
| 58 | + this.domScaler.title = "ドラッグでサイズを変更します"; | |
| 54 | 59 | this.domScaler.addEventListener('mousedown', this.onMouseDownScale.bind(this), false); |
| 55 | - window.renderLoop.requestRenderFunc(this.renderScaler.bind(this, null)); | |
| 60 | + window.renderLoop.requestRenderFunc(this.renderCreateForcus.bind(this, this.domScaler)); | |
| 56 | 61 | } |
| 57 | - renderScaler(rect) { | |
| 58 | - this.domScaler.style.display = (null == this.clingingPartner) ? "none" : "block"; | |
| 59 | - this.clingingPartner.appendChild(this.domScaler); | |
| 60 | - } | |
| 61 | - | |
| 62 | 62 | // 回転操作マーカー作成 |
| 63 | 63 | createRoller() { |
| 64 | 64 | this.domRoller = document.createElement('div'); |
| 65 | 65 | this.domRoller.dataset.objid = 'roller'; |
| 66 | 66 | this.domRoller.classList.add('roller'); |
| 67 | + this.domRoller.title = "ドラッグで回転します"; | |
| 67 | 68 | this.domRoller.addEventListener('mousedown', this.onMouseDownRoll.bind(this), false); |
| 68 | - window.renderLoop.requestRenderFunc(this.renderRoller.bind(this, null)); | |
| 69 | + window.renderLoop.requestRenderFunc(this.renderCreateForcus.bind(this, this.domRoller)); | |
| 69 | 70 | } |
| 70 | - renderRoller(rect) { | |
| 71 | - this.domRoller.style.display = (null == this.clingingPartner) ? "none" : "block"; | |
| 72 | - this.clingingPartner.appendChild(this.domRoller); | |
| 71 | + createMirrorLR() { | |
| 72 | + this.domMirrorLR = document.createElement('div'); | |
| 73 | + this.domMirrorLR.dataset.objid = 'mirrorLR'; | |
| 74 | + this.domMirrorLR.classList.add('mirrorLR'); | |
| 75 | + this.domMirrorLR.title = "左右反転します"; | |
| 76 | + this.domMirrorLR.addEventListener('mousedown', this.onMouseDownMirror.bind(this), false); | |
| 77 | + window.renderLoop.requestRenderFunc(this.renderCreateForcus.bind(this, this.domMirrorLR)); | |
| 73 | 78 | } |
| 79 | + createMirrorUD() { | |
| 80 | + this.domMirrorUD = document.createElement('div'); | |
| 81 | + this.domMirrorUD.dataset.objid = 'mirrorUD'; | |
| 82 | + this.domMirrorUD.classList.add('mirrorUD'); | |
| 83 | + this.domMirrorUD.title = "上下反転します"; | |
| 84 | + this.domMirrorUD.addEventListener('mousedown', this.onMouseDownMirror.bind(this), false); | |
| 85 | + window.renderLoop.requestRenderFunc(this.renderCreateForcus.bind(this, this.domMirrorUD)); | |
| 86 | + } | |
| 74 | 87 | |
| 75 | 88 | // 操作関数----------------------------------- |
| 76 | 89 | // Focus中の objid取得 |
| @@ -78,7 +91,7 @@ | ||
| 78 | 91 | getFocusedObjid() { |
| 79 | 92 | this.debuglog("getFocusedObjid()."); |
| 80 | 93 | let eleFocus = this.getFocusdElements(); |
| 81 | - if (eleFocus < 2) return null; | |
| 94 | + if (eleFocus.length < 2) return null; | |
| 82 | 95 | |
| 83 | 96 | return eleFocus[0].dataset.objid; |
| 84 | 97 | } |
| @@ -114,6 +127,16 @@ | ||
| 114 | 127 | delete this.domRoller; |
| 115 | 128 | this.domRoller = null; |
| 116 | 129 | } |
| 130 | + if (null != this.domMirrorLR) { | |
| 131 | + this.domMirrorLR.outerHTML = ""; | |
| 132 | + delete this.domMirrorLR; | |
| 133 | + this.domMirrorLR = null; | |
| 134 | + } | |
| 135 | + if (null != this.domMirrorUD) { | |
| 136 | + this.domMirrorUD.outerHTML = ""; | |
| 137 | + delete this.domMirrorUD; | |
| 138 | + this.domMirrorUD = null; | |
| 139 | + } | |
| 117 | 140 | } |
| 118 | 141 | |
| 119 | 142 | // Forcus先設定 |
| @@ -155,7 +178,7 @@ | ||
| 155 | 178 | onMouseDownScale(evt) { |
| 156 | 179 | this.debuglog('onMouseDownScale'); |
| 157 | 180 | let eleFocus = this.getFocusdElements(); |
| 158 | - if (eleFocus < 2) return; | |
| 181 | + if (eleFocus.length < 2) return; | |
| 159 | 182 | evt.stopPropagation(); // event伝播を自分のところで止める(上位に行かなくなる) |
| 160 | 183 | evt.preventDefault(); // 要素既定のdefault動作を止める |
| 161 | 184 |
| @@ -170,7 +193,7 @@ | ||
| 170 | 193 | } |
| 171 | 194 | mouseMoveScale(evt) { |
| 172 | 195 | let eleFocus = this.getFocusdElements(); |
| 173 | - if (eleFocus < 2) return; | |
| 196 | + if (eleFocus.length < 2) return; | |
| 174 | 197 | evt.stopPropagation(); // event伝播を自分のところで止める(上位に行かなくなる) |
| 175 | 198 | evt.preventDefault(); // 要素既定のdefault動作を止める |
| 176 | 199 |
| @@ -196,7 +219,7 @@ | ||
| 196 | 219 | } |
| 197 | 220 | renderMouseMoveScale(width, height, scalefont) { |
| 198 | 221 | let eleFocus = this.getFocusdElements(); |
| 199 | - if (eleFocus < 2) return; | |
| 222 | + if (eleFocus.length < 2) return; | |
| 200 | 223 | eleFocus[1].style.opacity = 0.4; |
| 201 | 224 | |
| 202 | 225 | switch(1){ |
| @@ -217,7 +240,7 @@ | ||
| 217 | 240 | window.appArea.setMouseEventObj(null, null, null); |
| 218 | 241 | |
| 219 | 242 | let eleFocus = this.getFocusdElements(); |
| 220 | - if (eleFocus < 2) return; | |
| 243 | + if (eleFocus.length < 2) return; | |
| 221 | 244 | evt.stopPropagation(); // event伝播を自分のところで止める(上位に行かなくなる) |
| 222 | 245 | evt.preventDefault(); // 要素既定のdefault動作を止める |
| 223 | 246 |
| @@ -249,7 +272,6 @@ | ||
| 249 | 272 | // Scale Command発行 |
| 250 | 273 | let cmd = new CCommandObj(); |
| 251 | 274 | cmd.createCommand(cmdType.request, cmdAddress.Focus, cmdAddress.ObjIDMgr, cmdCmd.scalebox, eleFocus[0].dataset.objid, rectFrom, rectTo, scaleY, 5); |
| 252 | - this.debuglog("postToWorker"); | |
| 253 | 275 | window.postToWorker.post(cmd); |
| 254 | 276 | } |
| 255 | 277 |
| @@ -263,7 +285,7 @@ | ||
| 263 | 285 | } |
| 264 | 286 | mouseMoveRoll(evt) { |
| 265 | 287 | let eleFocus = this.getFocusdElements(); |
| 266 | - if (eleFocus < 2) return; | |
| 288 | + if (eleFocus.length < 2) return; | |
| 267 | 289 | evt.stopPropagation(); // event伝播を自分のところで止める(上位に行かなくなる) |
| 268 | 290 | evt.preventDefault(); // 要素既定のdefault動作を止める |
| 269 | 291 |
| @@ -273,13 +295,16 @@ | ||
| 273 | 295 | let y2 = evt.pageY; |
| 274 | 296 | let degree = angle(x2, y2, x1, y1); |
| 275 | 297 | |
| 276 | - window.renderLoop.requestRenderFunc(this.renderMouseMoveRoll.bind(this, degree)); | |
| 298 | + let mirrorlr = parseInt(eleFocus[0].dataset.mirrorlr); | |
| 299 | + let mirrorud = parseInt(eleFocus[0].dataset.mirrorud); | |
| 300 | + | |
| 301 | + window.renderLoop.requestRenderFunc(this.renderMouseMoveRoll.bind(this, degree, mirrorlr, mirrorud)); | |
| 277 | 302 | } |
| 278 | - renderMouseMoveRoll(degree) { | |
| 303 | + renderMouseMoveRoll(degree, mirrorlr, mirrorud) { | |
| 279 | 304 | let eleFocus = this.getFocusdElements(); |
| 280 | - if (eleFocus < 2) return; | |
| 305 | + if (eleFocus.length < 2) return; | |
| 281 | 306 | |
| 282 | - eleFocus[0].style.transform = 'rotateZ(' + degree + 'deg);'; | |
| 307 | + eleFocus[0].style.transform = 'rotateY(' + mirrorlr + 'deg) rotateX(' + mirrorud + 'deg) rotateZ(' + degree + 'deg);'; | |
| 283 | 308 | } |
| 284 | 309 | mouseUpRoll(evt) { |
| 285 | 310 | this.debuglog('mouseUpRoll'); |
| @@ -286,7 +311,7 @@ | ||
| 286 | 311 | // Mouse event callback設定をクリア |
| 287 | 312 | window.appArea.setMouseEventObj(null, null, null); |
| 288 | 313 | let eleFocus = this.getFocusdElements(); |
| 289 | - if (eleFocus < 2) return; | |
| 314 | + if (eleFocus.length < 2) return; | |
| 290 | 315 | evt.stopPropagation(); // event伝播を自分のところで止める(上位に行かなくなる) |
| 291 | 316 | evt.preventDefault(); // 要素既定のdefault動作を止める |
| 292 | 317 |
| @@ -301,16 +326,55 @@ | ||
| 301 | 326 | // Rotate command発行 |
| 302 | 327 | let cmd = new CCommandObj(); |
| 303 | 328 | cmd.createCommand(cmdType.request, cmdAddress.Focus, cmdAddress.ObjIDMgr, cmdCmd.rollbox, eleFocus[0].dataset.objid, degree, null, null, 6); |
| 304 | - this.debuglog("postToWorker"); | |
| 305 | 329 | window.postToWorker.post(cmd); |
| 306 | 330 | } |
| 307 | 331 | |
| 332 | + onMouseDownMirror(evt) { | |
| 333 | + this.debuglog('onMouseDownMirror'); | |
| 334 | + evt.stopPropagation(); // event伝播を自分のところで止める(上位に行かなくなる) | |
| 335 | + evt.preventDefault(); // 要素既定のdefault動作を止める | |
| 308 | 336 | |
| 337 | + // Mouse eventをappAreaからRollerに渡してもらうように設定 | |
| 338 | + window.appArea.setMouseEventObj(null, this.mouseMoveMirror.bind(this), this.mouseUpMirror.bind(this)); | |
| 339 | + } | |
| 340 | + mouseMoveMirror(evt) { | |
| 341 | + let eleFocus = this.getFocusdElements(); | |
| 342 | + if (eleFocus.length < 2) return; | |
| 343 | + evt.stopPropagation(); // event伝播を自分のところで止める(上位に行かなくなる) | |
| 344 | + evt.preventDefault(); // 要素既定のdefault動作を止める | |
| 309 | 345 | |
| 346 | + // 画像反転させるだけなのでmouse moveは処理しない | |
| 347 | + } | |
| 348 | + mouseUpMirror(evt, target) { | |
| 349 | + this.debuglog('mouseUpMirror'); | |
| 350 | + // Mouse event callback設定をクリア | |
| 351 | + window.appArea.setMouseEventObj(null, null, null); | |
| 352 | + let eleFocus = this.getFocusdElements(); | |
| 353 | + if (eleFocus.length < 2) return; | |
| 354 | + evt.stopPropagation(); // event伝播を自分のところで止める(上位に行かなくなる) | |
| 355 | + evt.preventDefault(); // 要素既定のdefault動作を止める | |
| 310 | 356 | |
| 357 | + let command = -1; | |
| 358 | + switch (evt.target.dataset.objid) { | |
| 359 | + case "mirrorLR": | |
| 360 | + command = cmdCmd.mirrorlr; | |
| 361 | + break; | |
| 362 | + case "mirrorUD": | |
| 363 | + command = cmdCmd.mirrorud; | |
| 364 | + break; | |
| 365 | + default: | |
| 366 | + console.error('マウス入力処理エラー mouseUpMirror objid=' + evt.target.dataset.objid); | |
| 367 | + return; | |
| 368 | + } | |
| 369 | + let cmd = new CCommandObj(); | |
| 370 | + cmd.createCommand(cmdType.request, cmdAddress.Focus, cmdAddress.ObjIDMgr, command, eleFocus[0].dataset.objid, null, null, null, 6); | |
| 371 | + window.postToWorker.post(cmd); | |
| 372 | + } | |
| 311 | 373 | |
| 312 | 374 | |
| 313 | 375 | |
| 376 | + | |
| 377 | + | |
| 314 | 378 | getFocusdElements() { |
| 315 | 379 | let eleBase = this.clingingPartner; |
| 316 | 380 | if (null == eleBase) { |
| @@ -263,7 +263,6 @@ | ||
| 263 | 263 | |
| 264 | 264 | // Drag中 palette elementから target element へ CSS classを追加する |
| 265 | 265 | // 同じ種類のCSS class(Text color, BG imgなど)が既にある場合は上書き |
| 266 | - | |
| 267 | 266 | if( null != target) |
| 268 | 267 | this.replaceCSSclassToElement(palobjid, target.DOMobject); |
| 269 | 268 | } |
| @@ -130,7 +130,9 @@ | ||
| 130 | 130 | |
| 131 | 131 | /* フォーカス枠と拡大縮小・回転用マーカー定義 */ |
| 132 | 132 | .scaler, |
| 133 | - .roller { | |
| 133 | + .roller, | |
| 134 | + .mirrorLR, | |
| 135 | + .mirrorUD { | |
| 134 | 136 | position: absolute; |
| 135 | 137 | width: 15px; height: 15px; |
| 136 | 138 | padding: 0; margin: 0; |
| @@ -147,6 +149,16 @@ | ||
| 147 | 149 | transform: translateX(-50%) translateY(-50%); |
| 148 | 150 | background-color: green; |
| 149 | 151 | } |
| 152 | + .mirrorLR { | |
| 153 | + left: 0%; top: 0%; | |
| 154 | + transform: translateX(-50%) translateY(-50%); | |
| 155 | + background-color: lightpink; | |
| 156 | + } | |
| 157 | + .mirrorUD { | |
| 158 | + left: 100%; top:0%; | |
| 159 | + transform: translateX(-50%) translateY(-50%); | |
| 160 | + background-color: aquamarine; | |
| 161 | + } | |
| 150 | 162 | |
| 151 | 163 | .focusimage { |
| 152 | 164 | background-image: linear-gradient( |
| @@ -120,7 +120,7 @@ | ||
| 120 | 120 | this.cmdCreateResponse( cmdObj ); |
| 121 | 121 | |
| 122 | 122 | // Undo情報作成 |
| 123 | - this.createUndoInfo( cmdObj ); | |
| 123 | +// this.createUndoInfo( cmdObj ); | |
| 124 | 124 | |
| 125 | 125 | // cmdの宛先によりcmd送信処理分け |
| 126 | 126 | eachDestOfFuncTbl[ cmdObj.to ]( cmdObj ); |
| @@ -28,6 +28,8 @@ | ||
| 28 | 28 | movebox: 10, |
| 29 | 29 | scalebox: 11, |
| 30 | 30 | rollbox: 12, |
| 31 | + mirrorlr: 13, | |
| 32 | + mirrorud: 14, | |
| 31 | 33 | deletebox: 100, |
| 32 | 34 | }; |
| 33 | 35 |
| @@ -22,6 +22,8 @@ | ||
| 22 | 22 | this.originalHeight = 0.0; |
| 23 | 23 | this.opacity = 1.0; |
| 24 | 24 | this.degree = 0; |
| 25 | + this.mirrorLRdeg = 0; | |
| 26 | + this.mirrorUDdeg = 0; | |
| 25 | 27 | this.text = null; |
| 26 | 28 | this.transformStr = null; |
| 27 | 29 |
| @@ -110,7 +112,9 @@ | ||
| 110 | 112 | this.DOMbase = document.createElement('div'); |
| 111 | 113 | this.DOMbase.classList.add('DispBase'); |
| 112 | 114 | this.DOMbase.dataset.objid = this.ObjID; |
| 113 | - this.DOMbase.dataset.degree = 0; | |
| 115 | + this.DOMbase.dataset.degree = this.degree; | |
| 116 | + this.DOMbase.dataset.mirrorlr = this.mirrorLRdeg; | |
| 117 | + this.DOMbase.dataset.mirrorud = this.mirrorUDdeg; | |
| 114 | 118 | this.DOMbase.addEventListener('mousedown', this.onMouseDown.bind(this), false); |
| 115 | 119 | // DispObj作成 |
| 116 | 120 | let elType = (null != type.match(/imagebox/)) ? 'img' : 'div'; |
| @@ -213,6 +217,8 @@ | ||
| 213 | 217 | this.height = parseInt(ele.style.height); |
| 214 | 218 | this.ObjID = ele.dataset.objid; |
| 215 | 219 | this.degree = ele.dataset.degree; |
| 220 | + this.mirrorLRdeg = ele.dataset.mirrorlr; | |
| 221 | + this.mirrorUDdeg = ele.dataset.mirrorud; | |
| 216 | 222 | this.DOMbase.addEventListener('mousedown', this.onMouseDown.bind(this), false); |
| 217 | 223 | |
| 218 | 224 | if( ele.children.length < 1 ){ |
| @@ -277,11 +283,20 @@ | ||
| 277 | 283 | window.renderLoop.requestRenderFunc(this.renderrollbox.bind(this)); |
| 278 | 284 | } |
| 279 | 285 | renderrollbox() { |
| 280 | - this.DOMbase.style.transform = 'rotateZ(' + this.degree + 'deg);'; | |
| 286 | + this.DOMbase.style.transform = 'rotateY(' + this.mirrorLRdeg + 'deg) rotateX(' + this.mirrorUDdeg + 'deg) rotateZ(' + this.degree + 'deg);'; | |
| 281 | 287 | } |
| 288 | + mirrorLR() { | |
| 289 | + this.mirrorLRdeg = (0 < this.mirrorLRdeg) ? 0 : 180; | |
| 290 | + this.DOMbase.dataset.mirrorlr = this.mirrorLRdeg; | |
| 291 | + window.renderLoop.requestRenderFunc(this.renderrollbox.bind(this)); | |
| 292 | + } | |
| 293 | + mirrorUD() { | |
| 294 | + this.mirrorUDdeg = (0 < this.mirrorUDdeg) ? 0 : 180; | |
| 295 | + this.DOMbase.dataset.mirrorud = this.mirrorUDdeg; | |
| 296 | + window.renderLoop.requestRenderFunc(this.renderrollbox.bind(this)); | |
| 297 | + } | |
| 282 | 298 | |
| 283 | 299 | |
| 284 | - | |
| 285 | 300 | checkType(str) { |
| 286 | 301 | return true; |
| 287 | 302 | } |
| @@ -133,6 +133,19 @@ | ||
| 133 | 133 | } |
| 134 | 134 | } |
| 135 | 135 | |
| 136 | + mirrorLR(id) { | |
| 137 | + this.debuglog('mirrorLR id=' + id); | |
| 138 | + if (id < this.ObjIDLen) { | |
| 139 | + this.ObjIDarray[id].mirrorLR(); | |
| 140 | + } | |
| 141 | + } | |
| 142 | + mirrorUD(id) { | |
| 143 | + this.debuglog('mirrorUD id=' + id); | |
| 144 | + if (id < this.ObjIDLen) { | |
| 145 | + this.ObjIDarray[id].mirrorUD(); | |
| 146 | + } | |
| 147 | + } | |
| 148 | + | |
| 136 | 149 | deletebox(id) { |
| 137 | 150 | // 要素を画面から隠す。削除はしない。Undoに対応するため。 |
| 138 | 151 | // 要素を DOM treeから 切り離すことで表示されないようにする |
| @@ -16,6 +16,8 @@ | ||
| 16 | 16 | this.DOM = [null, null, null, null]; // focus表示用 |
| 17 | 17 | this.domScaler = null; |
| 18 | 18 | this.domRoller = null; |
| 19 | + this.domMirrorLR = null; | |
| 20 | + this.domMirrorUD = null; | |
| 19 | 21 | } |
| 20 | 22 | |
| 21 | 23 | debuglog(str) { |
| @@ -33,14 +35,16 @@ | ||
| 33 | 35 | this.DOM[cnt].dataset.objid = this.num2str[cnt]; |
| 34 | 36 | this.DOM[cnt].classList.add('focusimage'); |
| 35 | 37 | this.DOM[cnt].classList.add(this.num2str[cnt]); |
| 36 | - window.renderLoop.requestRenderFunc(this.renderCreateOneFocusbar.bind(this, this.DOM[cnt], null)); | |
| 38 | + window.renderLoop.requestRenderFunc(this.renderCreateForcus.bind(this, this.DOM[cnt])); | |
| 37 | 39 | } |
| 38 | 40 | // this.debuglog("create() renderFunc size=" + this.renderFunc.size()); |
| 39 | 41 | |
| 40 | 42 | this.createScaler(); |
| 41 | 43 | this.createRoller(); |
| 44 | + this.createMirrorLR(); | |
| 45 | + this.createMirrorUD(); | |
| 42 | 46 | } |
| 43 | - renderCreateOneFocusbar(dom, rect) { | |
| 47 | + renderCreateForcus(dom) { | |
| 44 | 48 | dom.style.display = (null == this.clingingPartner) ? "none" : "block"; |
| 45 | 49 | this.clingingPartner.appendChild(dom); |
| 46 | 50 | } |
| @@ -51,26 +55,35 @@ | ||
| 51 | 55 | this.domScaler = document.createElement('div'); |
| 52 | 56 | this.domScaler.dataset.objid = 'scaler'; |
| 53 | 57 | this.domScaler.classList.add('scaler'); |
| 58 | + this.domScaler.title = "ドラッグでサイズを変更します"; | |
| 54 | 59 | this.domScaler.addEventListener('mousedown', this.onMouseDownScale.bind(this), false); |
| 55 | - window.renderLoop.requestRenderFunc(this.renderScaler.bind(this, null)); | |
| 60 | + window.renderLoop.requestRenderFunc(this.renderCreateForcus.bind(this, this.domScaler)); | |
| 56 | 61 | } |
| 57 | - renderScaler(rect) { | |
| 58 | - this.domScaler.style.display = (null == this.clingingPartner) ? "none" : "block"; | |
| 59 | - this.clingingPartner.appendChild(this.domScaler); | |
| 60 | - } | |
| 61 | - | |
| 62 | 62 | // 回転操作マーカー作成 |
| 63 | 63 | createRoller() { |
| 64 | 64 | this.domRoller = document.createElement('div'); |
| 65 | 65 | this.domRoller.dataset.objid = 'roller'; |
| 66 | 66 | this.domRoller.classList.add('roller'); |
| 67 | + this.domRoller.title = "ドラッグで回転します"; | |
| 67 | 68 | this.domRoller.addEventListener('mousedown', this.onMouseDownRoll.bind(this), false); |
| 68 | - window.renderLoop.requestRenderFunc(this.renderRoller.bind(this, null)); | |
| 69 | + window.renderLoop.requestRenderFunc(this.renderCreateForcus.bind(this, this.domRoller)); | |
| 69 | 70 | } |
| 70 | - renderRoller(rect) { | |
| 71 | - this.domRoller.style.display = (null == this.clingingPartner) ? "none" : "block"; | |
| 72 | - this.clingingPartner.appendChild(this.domRoller); | |
| 71 | + createMirrorLR() { | |
| 72 | + this.domMirrorLR = document.createElement('div'); | |
| 73 | + this.domMirrorLR.dataset.objid = 'mirrorLR'; | |
| 74 | + this.domMirrorLR.classList.add('mirrorLR'); | |
| 75 | + this.domMirrorLR.title = "左右反転します"; | |
| 76 | + this.domMirrorLR.addEventListener('mousedown', this.onMouseDownMirror.bind(this), false); | |
| 77 | + window.renderLoop.requestRenderFunc(this.renderCreateForcus.bind(this, this.domMirrorLR)); | |
| 73 | 78 | } |
| 79 | + createMirrorUD() { | |
| 80 | + this.domMirrorUD = document.createElement('div'); | |
| 81 | + this.domMirrorUD.dataset.objid = 'mirrorUD'; | |
| 82 | + this.domMirrorUD.classList.add('mirrorUD'); | |
| 83 | + this.domMirrorUD.title = "上下反転します"; | |
| 84 | + this.domMirrorUD.addEventListener('mousedown', this.onMouseDownMirror.bind(this), false); | |
| 85 | + window.renderLoop.requestRenderFunc(this.renderCreateForcus.bind(this, this.domMirrorUD)); | |
| 86 | + } | |
| 74 | 87 | |
| 75 | 88 | // 操作関数----------------------------------- |
| 76 | 89 | // Focus中の objid取得 |
| @@ -78,7 +91,7 @@ | ||
| 78 | 91 | getFocusedObjid() { |
| 79 | 92 | this.debuglog("getFocusedObjid()."); |
| 80 | 93 | let eleFocus = this.getFocusdElements(); |
| 81 | - if (eleFocus < 2) return null; | |
| 94 | + if (eleFocus.length < 2) return null; | |
| 82 | 95 | |
| 83 | 96 | return eleFocus[0].dataset.objid; |
| 84 | 97 | } |
| @@ -114,6 +127,16 @@ | ||
| 114 | 127 | delete this.domRoller; |
| 115 | 128 | this.domRoller = null; |
| 116 | 129 | } |
| 130 | + if (null != this.domMirrorLR) { | |
| 131 | + this.domMirrorLR.outerHTML = ""; | |
| 132 | + delete this.domMirrorLR; | |
| 133 | + this.domMirrorLR = null; | |
| 134 | + } | |
| 135 | + if (null != this.domMirrorUD) { | |
| 136 | + this.domMirrorUD.outerHTML = ""; | |
| 137 | + delete this.domMirrorUD; | |
| 138 | + this.domMirrorUD = null; | |
| 139 | + } | |
| 117 | 140 | } |
| 118 | 141 | |
| 119 | 142 | // Forcus先設定 |
| @@ -155,7 +178,7 @@ | ||
| 155 | 178 | onMouseDownScale(evt) { |
| 156 | 179 | this.debuglog('onMouseDownScale'); |
| 157 | 180 | let eleFocus = this.getFocusdElements(); |
| 158 | - if (eleFocus < 2) return; | |
| 181 | + if (eleFocus.length < 2) return; | |
| 159 | 182 | evt.stopPropagation(); // event伝播を自分のところで止める(上位に行かなくなる) |
| 160 | 183 | evt.preventDefault(); // 要素既定のdefault動作を止める |
| 161 | 184 |
| @@ -170,7 +193,7 @@ | ||
| 170 | 193 | } |
| 171 | 194 | mouseMoveScale(evt) { |
| 172 | 195 | let eleFocus = this.getFocusdElements(); |
| 173 | - if (eleFocus < 2) return; | |
| 196 | + if (eleFocus.length < 2) return; | |
| 174 | 197 | evt.stopPropagation(); // event伝播を自分のところで止める(上位に行かなくなる) |
| 175 | 198 | evt.preventDefault(); // 要素既定のdefault動作を止める |
| 176 | 199 |
| @@ -196,7 +219,7 @@ | ||
| 196 | 219 | } |
| 197 | 220 | renderMouseMoveScale(width, height, scalefont) { |
| 198 | 221 | let eleFocus = this.getFocusdElements(); |
| 199 | - if (eleFocus < 2) return; | |
| 222 | + if (eleFocus.length < 2) return; | |
| 200 | 223 | eleFocus[1].style.opacity = 0.4; |
| 201 | 224 | |
| 202 | 225 | switch(1){ |
| @@ -217,7 +240,7 @@ | ||
| 217 | 240 | window.appArea.setMouseEventObj(null, null, null); |
| 218 | 241 | |
| 219 | 242 | let eleFocus = this.getFocusdElements(); |
| 220 | - if (eleFocus < 2) return; | |
| 243 | + if (eleFocus.length < 2) return; | |
| 221 | 244 | evt.stopPropagation(); // event伝播を自分のところで止める(上位に行かなくなる) |
| 222 | 245 | evt.preventDefault(); // 要素既定のdefault動作を止める |
| 223 | 246 |
| @@ -249,7 +272,6 @@ | ||
| 249 | 272 | // Scale Command発行 |
| 250 | 273 | let cmd = new CCommandObj(); |
| 251 | 274 | cmd.createCommand(cmdType.request, cmdAddress.Focus, cmdAddress.ObjIDMgr, cmdCmd.scalebox, eleFocus[0].dataset.objid, rectFrom, rectTo, scaleY, 5); |
| 252 | - this.debuglog("postToWorker"); | |
| 253 | 275 | window.postToWorker.post(cmd); |
| 254 | 276 | } |
| 255 | 277 |
| @@ -263,7 +285,7 @@ | ||
| 263 | 285 | } |
| 264 | 286 | mouseMoveRoll(evt) { |
| 265 | 287 | let eleFocus = this.getFocusdElements(); |
| 266 | - if (eleFocus < 2) return; | |
| 288 | + if (eleFocus.length < 2) return; | |
| 267 | 289 | evt.stopPropagation(); // event伝播を自分のところで止める(上位に行かなくなる) |
| 268 | 290 | evt.preventDefault(); // 要素既定のdefault動作を止める |
| 269 | 291 |
| @@ -273,13 +295,16 @@ | ||
| 273 | 295 | let y2 = evt.pageY; |
| 274 | 296 | let degree = angle(x2, y2, x1, y1); |
| 275 | 297 | |
| 276 | - window.renderLoop.requestRenderFunc(this.renderMouseMoveRoll.bind(this, degree)); | |
| 298 | + let mirrorlr = parseInt(eleFocus[0].dataset.mirrorlr); | |
| 299 | + let mirrorud = parseInt(eleFocus[0].dataset.mirrorud); | |
| 300 | + | |
| 301 | + window.renderLoop.requestRenderFunc(this.renderMouseMoveRoll.bind(this, degree, mirrorlr, mirrorud)); | |
| 277 | 302 | } |
| 278 | - renderMouseMoveRoll(degree) { | |
| 303 | + renderMouseMoveRoll(degree, mirrorlr, mirrorud) { | |
| 279 | 304 | let eleFocus = this.getFocusdElements(); |
| 280 | - if (eleFocus < 2) return; | |
| 305 | + if (eleFocus.length < 2) return; | |
| 281 | 306 | |
| 282 | - eleFocus[0].style.transform = 'rotateZ(' + degree + 'deg);'; | |
| 307 | + eleFocus[0].style.transform = 'rotateY(' + mirrorlr + 'deg) rotateX(' + mirrorud + 'deg) rotateZ(' + degree + 'deg);'; | |
| 283 | 308 | } |
| 284 | 309 | mouseUpRoll(evt) { |
| 285 | 310 | this.debuglog('mouseUpRoll'); |
| @@ -286,7 +311,7 @@ | ||
| 286 | 311 | // Mouse event callback設定をクリア |
| 287 | 312 | window.appArea.setMouseEventObj(null, null, null); |
| 288 | 313 | let eleFocus = this.getFocusdElements(); |
| 289 | - if (eleFocus < 2) return; | |
| 314 | + if (eleFocus.length < 2) return; | |
| 290 | 315 | evt.stopPropagation(); // event伝播を自分のところで止める(上位に行かなくなる) |
| 291 | 316 | evt.preventDefault(); // 要素既定のdefault動作を止める |
| 292 | 317 |
| @@ -301,16 +326,55 @@ | ||
| 301 | 326 | // Rotate command発行 |
| 302 | 327 | let cmd = new CCommandObj(); |
| 303 | 328 | cmd.createCommand(cmdType.request, cmdAddress.Focus, cmdAddress.ObjIDMgr, cmdCmd.rollbox, eleFocus[0].dataset.objid, degree, null, null, 6); |
| 304 | - this.debuglog("postToWorker"); | |
| 305 | 329 | window.postToWorker.post(cmd); |
| 306 | 330 | } |
| 307 | 331 | |
| 332 | + onMouseDownMirror(evt) { | |
| 333 | + this.debuglog('onMouseDownMirror'); | |
| 334 | + evt.stopPropagation(); // event伝播を自分のところで止める(上位に行かなくなる) | |
| 335 | + evt.preventDefault(); // 要素既定のdefault動作を止める | |
| 308 | 336 | |
| 337 | + // Mouse eventをappAreaからRollerに渡してもらうように設定 | |
| 338 | + window.appArea.setMouseEventObj(null, this.mouseMoveMirror.bind(this), this.mouseUpMirror.bind(this)); | |
| 339 | + } | |
| 340 | + mouseMoveMirror(evt) { | |
| 341 | + let eleFocus = this.getFocusdElements(); | |
| 342 | + if (eleFocus.length < 2) return; | |
| 343 | + evt.stopPropagation(); // event伝播を自分のところで止める(上位に行かなくなる) | |
| 344 | + evt.preventDefault(); // 要素既定のdefault動作を止める | |
| 309 | 345 | |
| 346 | + // 画像反転させるだけなのでmouse moveは処理しない | |
| 347 | + } | |
| 348 | + mouseUpMirror(evt, target) { | |
| 349 | + this.debuglog('mouseUpMirror'); | |
| 350 | + // Mouse event callback設定をクリア | |
| 351 | + window.appArea.setMouseEventObj(null, null, null); | |
| 352 | + let eleFocus = this.getFocusdElements(); | |
| 353 | + if (eleFocus.length < 2) return; | |
| 354 | + evt.stopPropagation(); // event伝播を自分のところで止める(上位に行かなくなる) | |
| 355 | + evt.preventDefault(); // 要素既定のdefault動作を止める | |
| 310 | 356 | |
| 357 | + let command = -1; | |
| 358 | + switch (evt.target.dataset.objid) { | |
| 359 | + case "mirrorLR": | |
| 360 | + command = cmdCmd.mirrorlr; | |
| 361 | + break; | |
| 362 | + case "mirrorUD": | |
| 363 | + command = cmdCmd.mirrorud; | |
| 364 | + break; | |
| 365 | + default: | |
| 366 | + console.error('マウス入力処理エラー mouseUpMirror objid=' + evt.target.dataset.objid); | |
| 367 | + return; | |
| 368 | + } | |
| 369 | + let cmd = new CCommandObj(); | |
| 370 | + cmd.createCommand(cmdType.request, cmdAddress.Focus, cmdAddress.ObjIDMgr, command, eleFocus[0].dataset.objid, null, null, null, 6); | |
| 371 | + window.postToWorker.post(cmd); | |
| 372 | + } | |
| 311 | 373 | |
| 312 | 374 | |
| 313 | 375 | |
| 376 | + | |
| 377 | + | |
| 314 | 378 | getFocusdElements() { |
| 315 | 379 | let eleBase = this.clingingPartner; |
| 316 | 380 | if (null == eleBase) { |
| @@ -130,6 +130,12 @@ | ||
| 130 | 130 | // objid degree |
| 131 | 131 | window.ObjIDMgr.rollbox(cmd.param1, cmd.param2); |
| 132 | 132 | break; |
| 133 | + case cmdCmd.mirrorlr: // 左右反転 | |
| 134 | + window.ObjIDMgr.mirrorLR(cmd.param1); | |
| 135 | + break; | |
| 136 | + case cmdCmd.mirrorud: // 上下反転 | |
| 137 | + window.ObjIDMgr.mirrorUD(cmd.param1); | |
| 138 | + break; | |
| 133 | 139 | case cmdCmd.deletebox: // 要素の削除 |
| 134 | 140 | // Focus先が消えるため、focusも解除 |
| 135 | 141 | window.partsFocus.setClingingPartner(null); |
| @@ -171,8 +177,10 @@ | ||
| 171 | 177 | let filename = 'savefile.dd'; |
| 172 | 178 | let save = new SaveFile(); |
| 173 | 179 | |
| 174 | - // save.saveFileBrowser(filename, savestr); | |
| 175 | - save.saveFileApp(filename, savestr, cmp, err); | |
| 180 | + if( Windows ) | |
| 181 | + save.saveFileApp(filename, savestr, cmp, err); | |
| 182 | + else | |
| 183 | + save.saveFileBrowser(filename, savestr); | |
| 176 | 184 | // Anime GIFなどを指定されていると保存に時間がかかる (禁止にしたい) |
| 177 | 185 | // 保存中 dialogが必要 |
| 178 | 186 | }; |
| @@ -263,7 +263,6 @@ | ||
| 263 | 263 | |
| 264 | 264 | // Drag中 palette elementから target element へ CSS classを追加する |
| 265 | 265 | // 同じ種類のCSS class(Text color, BG imgなど)が既にある場合は上書き |
| 266 | - | |
| 267 | 266 | if( null != target) |
| 268 | 267 | this.replaceCSSclassToElement(palobjid, target.DOMobject); |
| 269 | 268 | } |
| @@ -0,0 +1,28 @@ | ||
| 1 | +@-we-palette{ | |
| 2 | + | |
| 3 | + @global{ | |
| 4 | + color: #2c77ba; | |
| 5 | + color: #58B3F0; | |
| 6 | + color: #C6E2EE; | |
| 7 | + color: #1F98C7; | |
| 8 | + color: #78C1DD; | |
| 9 | + color: #000000; | |
| 10 | + color: #111111; | |
| 11 | + color: #222222; | |
| 12 | + color: #252525; | |
| 13 | + color: #333333; | |
| 14 | + color: #555555; | |
| 15 | + color: #666666; | |
| 16 | + color: #777777; | |
| 17 | + color: #999999; | |
| 18 | + color: #AAAAAA; | |
| 19 | + color: #BBBBBB; | |
| 20 | + color: #CCCCCC; | |
| 21 | + color: #DDDDDD; | |
| 22 | + color: #E8E8E8; | |
| 23 | + color: #EEEEEE; | |
| 24 | + color: #F5F5F5; | |
| 25 | + color: #F9F9F9; | |
| 26 | + color: #FFFFFF; | |
| 27 | + } | |
| 28 | +} | |
| \ No newline at end of file |
| @@ -0,0 +1,46 @@ | ||
| 1 | +{ | |
| 2 | + "BrowserLink": { | |
| 3 | + "CssIgnorePatterns": "bootstrap*; reset.css; normalize.css; jquery*; toastr*; foundation*; animate*; inuit*; elements*; ratchet*; hint*; flat-ui*; 960*; skeleton*", | |
| 4 | + "EnableMenu": true, | |
| 5 | + "EnablePixelPushing": true, | |
| 6 | + "ShowMenu": true | |
| 7 | + }, | |
| 8 | + "CodeGen": { | |
| 9 | + "AddTypeScriptReferencePath": true, | |
| 10 | + "CamelCaseEnumerationValues": false, | |
| 11 | + "CamelCasePropertyNames": true, | |
| 12 | + "CamelCaseTypeNames": false | |
| 13 | + }, | |
| 14 | + "Css": { | |
| 15 | + "ShowBrowserTooltip": true, | |
| 16 | + "ShowInitialInherit": false, | |
| 17 | + "SyncBase64ImageValues": true, | |
| 18 | + "SyncVendorValues": true, | |
| 19 | + "ValidateDuplicateSelectors": true, | |
| 20 | + "ValidateVendorSpecifics": true, | |
| 21 | + "ValidationLocation": "Messages" | |
| 22 | + }, | |
| 23 | + "General": { | |
| 24 | + "AllMessagesToOutputWindow": false, | |
| 25 | + "KeepImportantComments": true, | |
| 26 | + "ShowLogoWatermark": true, | |
| 27 | + "SvgPreviewPane": true | |
| 28 | + }, | |
| 29 | + "Html": { | |
| 30 | + "AttributeQuotesRemovalMode": "KeepQuotes", | |
| 31 | + "CustomAngularDirectiveList": null, | |
| 32 | + "EnableBootstrapValidation": true, | |
| 33 | + "EnableEnterFormat": true, | |
| 34 | + "EnableFoundationValidation": true, | |
| 35 | + "EnableMicrodataValidation": true, | |
| 36 | + "MinifyAngularBindingExpressions": false, | |
| 37 | + "MinifyKnockoutBindingExpressions": false, | |
| 38 | + "PreserveCase": false, | |
| 39 | + "ProcessableScriptTypeList": null | |
| 40 | + }, | |
| 41 | + "JavaScript": { | |
| 42 | + "BlockCommentCompletion": false, | |
| 43 | + "EvalTreatment": "MakeImmediateSafe", | |
| 44 | + "TermSemicolons": false | |
| 45 | + } | |
| 46 | +} | |
| \ No newline at end of file |