• R/O
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

javac++androidlinuxc#objective-cqtwindows誰得cocoapythonphprubygameguibathyscaphec翻訳omegat計画中(planning stage)frameworktwittertestdomvb.netdirectxbtronarduinopreviewerゲームエンジン

JavaScriptを色々あれこれしようとするがひたすら失敗を繰り返している


Commit MetaInfo

Révision38 (tree)
l'heure2016-12-02 22:52:57
Auteurtakoyaki_umaaaa

Message de Log

(empty log message)

Change Summary

Modification

--- HtmlDrawApp/HTMLDrawApp/bin/x64/Debug/AppX/css/default.css (revision 37)
+++ HtmlDrawApp/HTMLDrawApp/bin/x64/Debug/AppX/css/default.css (revision 38)
@@ -35,6 +35,7 @@
3535
3636 #apparea{
3737 display: block;
38+ position: relative;
3839 width: 100%; height: 100%;
3940 border: none;
4041 margin: 0; padding: 0;
@@ -44,6 +45,7 @@
4445 /* キャンバス要素の定義 */
4546 #DispField{
4647 display:block;
48+ position:relative;
4749 width:400px; height:300px;
4850 border: none;
4951 margin: 0; padding: 0;
@@ -52,6 +54,7 @@
5254
5355 #FrameArea{
5456 display:block;
57+ position: absolute;
5558 width: 100%; height: 100%;
5659 border: 1px solid black;
5760 margin: 0; padding: 0;
@@ -85,17 +88,14 @@
8588 display: inline-block;
8689 position: absolute;
8790 left:0px; top:310px;
88- margin: 0px;
89- padding: 5px;
91+ width: 195px; /* (5+25+5) * 5 + (5+5) */
92+ height: 55px;
93+ margin: 0px; padding: 5px;
9094 background-color: rgba(205,133,63,0.6);
91- border: 1px solid black;
95+ border: 2px solid gray;
9296 border-radius: 4px;
9397 box-shadow: 16px 16px 19px -11px rgba(0, 0, 0, 0.21);
9498 }
95- .palgrouphorizon {
96- width: 195px; /* (5+25+5) * 5 + (5+5) */
97- height: 55px;
98- }
9999 .pallegend {
100100 background-color: transparent;
101101 font-weight: bold;
--- HtmlDrawApp/HTMLDrawApp/bin/x64/Debug/AppX/index.html (revision 37)
+++ HtmlDrawApp/HTMLDrawApp/bin/x64/Debug/AppX/index.html (revision 38)
@@ -161,7 +161,7 @@
161161 }
162162 </style>
163163
164- <fieldset class="palgroup palgrouphorizon" data-objid="palgroup0" title="背景の色や画像を設定するパレットです">
164+ <fieldset class="palgroup" data-objid="palgroup0" title="背景の色や画像を設定するパレットです">
165165 <legend class="pallegend"> Background Palette </legend>
166166 <div class="palbg palbg0" data-objid="palbg0" data-palid="0"></div>
167167 <div class="palbg palbg1" data-objid="palbg1" data-palid="1"></div>
@@ -171,7 +171,7 @@
171171 </fieldset>
172172 <br />
173173
174- <fieldset class="palgroup palgrouphorizon" data-objid="palgroup1" title="テキストの色を設定するパレットです">
174+ <fieldset class="palgroup" data-objid="palgroup1" title="テキストの色を設定するパレットです">
175175 <legend class="pallegend"> Text Color Palette </legend>
176176 <div class="paltxtcol paltxtcol0" data-objid="paltxtcol0" data-palid="0">あ</div>
177177 <div class="paltxtcol paltxtcol1" data-objid="paltxtcol1" data-palid="1">あ</div>
@@ -182,7 +182,7 @@
182182
183183 <br />
184184
185- <fieldset class="palgroup palgrouphorizon" data-objid="palgroup2" title="動きを設定するパレットです">
185+ <fieldset class="palgroup" data-objid="palgroup2" title="動きを設定するパレットです">
186186 <legend class="pallegend"> Action Palette <span id="btnpauseanim" class="buttonstyle" title="要素の動きを一時的に停止します">Ⅱ</span></legend>
187187 <div class="palact palact0" data-objid="palact0" data-palid="0"></div>
188188 <div class="palact palact1" data-objid="palact1" data-palid="1"></div>
--- HtmlDrawApp/HTMLDrawApp/bin/x64/Debug/AppX/js/Common.js (revision 37)
+++ HtmlDrawApp/HTMLDrawApp/bin/x64/Debug/AppX/js/Common.js (revision 38)
@@ -231,7 +231,7 @@
231231 result = e.classList.contains(className);
232232 if (true == result) break;
233233
234- e = e.parent;
234+ e = e.parentElement;
235235 } while (null != e);
236236 }
237237 return e;
@@ -377,18 +377,19 @@
377377 // 引数のcallbackを1回呼び出します
378378 // callback: function callback(time)
379379 requestRenderFunc(callback) {
380- console.log('Request render function = ' + (callback ? callback.name : 'null'));
380+// console.log('Request render function = ' + (callback ? callback.name : 'null'));
381381 if (null != callback){
382382 this.renderQue.enqueue(callback);
383383
384384 // 描画loop
385- (function renderloop(time) {
385+ let loopfunc = function renderloop(time) {
386386 if (0 < this.renderQue.size()) {
387387 this.renderQue.dequeue()(time);
388- console.log('render func size=' + this.renderQue.size());
388+// console.log('render func size=' + this.renderQue.size());
389389 requestAnimationFrame(renderloop.bind(this));
390390 }
391- }.call(this,window.performance.now()));
391+ }
392+ loopfunc.call(this, window.performance.now());
392393 }
393394 }
394395 }
--- HtmlDrawApp/HTMLDrawApp/bin/x64/Debug/AppX/js/DispObj.js (revision 37)
+++ HtmlDrawApp/HTMLDrawApp/bin/x64/Debug/AppX/js/DispObj.js (revision 38)
@@ -216,9 +216,9 @@
216216 this.width = parseInt(ele.style.width);
217217 this.height = parseInt(ele.style.height);
218218 this.ObjID = ele.dataset.objid;
219- this.degree = ele.dataset.degree;
220- this.mirrorLRdeg = ele.dataset.mirrorlr;
221- this.mirrorUDdeg = ele.dataset.mirrorud;
219+ this.degree = parseFloat(ele.dataset.degree);
220+ this.mirrorLRdeg = parseInt(ele.dataset.mirrorlr);
221+ this.mirrorUDdeg = parseInt(ele.dataset.mirrorud);
222222 this.DOMbase.addEventListener('mousedown', this.onMouseDown.bind(this), false);
223223
224224 if( ele.children.length < 1 ){
@@ -286,12 +286,12 @@
286286 this.DOMbase.style.transform = 'rotateY(' + this.mirrorLRdeg + 'deg) rotateX(' + this.mirrorUDdeg + 'deg) rotateZ(' + this.degree + 'deg);';
287287 }
288288 mirrorLR() {
289- this.mirrorLRdeg = (0 < this.mirrorLRdeg) ? 0 : 180;
289+ this.mirrorLRdeg = (0 == this.mirrorLRdeg) ? 180 : 0;
290290 this.DOMbase.dataset.mirrorlr = this.mirrorLRdeg;
291291 window.renderLoop.requestRenderFunc(this.renderrollbox.bind(this));
292292 }
293293 mirrorUD() {
294- this.mirrorUDdeg = (0 < this.mirrorUDdeg) ? 0 : 180;
294+ this.mirrorUDdeg = (0 == this.mirrorUDdeg) ? 180 : 0;
295295 this.DOMbase.dataset.mirrorud = this.mirrorUDdeg;
296296 window.renderLoop.requestRenderFunc(this.renderrollbox.bind(this));
297297 }
--- HtmlDrawApp/HTMLDrawApp/css/default.css (revision 37)
+++ HtmlDrawApp/HTMLDrawApp/css/default.css (revision 38)
@@ -35,6 +35,7 @@
3535
3636 #apparea{
3737 display: block;
38+ position: relative;
3839 width: 100%; height: 100%;
3940 border: none;
4041 margin: 0; padding: 0;
@@ -44,6 +45,7 @@
4445 /* キャンバス要素の定義 */
4546 #DispField{
4647 display:block;
48+ position:relative;
4749 width:400px; height:300px;
4850 border: none;
4951 margin: 0; padding: 0;
@@ -52,6 +54,7 @@
5254
5355 #FrameArea{
5456 display:block;
57+ position: absolute;
5558 width: 100%; height: 100%;
5659 border: 1px solid black;
5760 margin: 0; padding: 0;
@@ -85,17 +88,14 @@
8588 display: inline-block;
8689 position: absolute;
8790 left:0px; top:310px;
88- margin: 0px;
89- padding: 5px;
91+ width: 195px; /* (5+25+5) * 5 + (5+5) */
92+ height: 55px;
93+ margin: 0px; padding: 5px;
9094 background-color: rgba(205,133,63,0.6);
91- border: 1px solid black;
95+ border: 2px solid gray;
9296 border-radius: 4px;
9397 box-shadow: 16px 16px 19px -11px rgba(0, 0, 0, 0.21);
9498 }
95- .palgrouphorizon {
96- width: 195px; /* (5+25+5) * 5 + (5+5) */
97- height: 55px;
98- }
9999 .pallegend {
100100 background-color: transparent;
101101 font-weight: bold;
--- HtmlDrawApp/HTMLDrawApp/index.html (revision 37)
+++ HtmlDrawApp/HTMLDrawApp/index.html (revision 38)
@@ -161,7 +161,7 @@
161161 }
162162 </style>
163163
164- <fieldset class="palgroup palgrouphorizon" data-objid="palgroup0" title="背景の色や画像を設定するパレットです">
164+ <fieldset class="palgroup" data-objid="palgroup0" title="背景の色や画像を設定するパレットです">
165165 <legend class="pallegend"> Background Palette </legend>
166166 <div class="palbg palbg0" data-objid="palbg0" data-palid="0"></div>
167167 <div class="palbg palbg1" data-objid="palbg1" data-palid="1"></div>
@@ -171,7 +171,7 @@
171171 </fieldset>
172172 <br />
173173
174- <fieldset class="palgroup palgrouphorizon" data-objid="palgroup1" title="テキストの色を設定するパレットです">
174+ <fieldset class="palgroup" data-objid="palgroup1" title="テキストの色を設定するパレットです">
175175 <legend class="pallegend"> Text Color Palette </legend>
176176 <div class="paltxtcol paltxtcol0" data-objid="paltxtcol0" data-palid="0">あ</div>
177177 <div class="paltxtcol paltxtcol1" data-objid="paltxtcol1" data-palid="1">あ</div>
@@ -182,7 +182,7 @@
182182
183183 <br />
184184
185- <fieldset class="palgroup palgrouphorizon" data-objid="palgroup2" title="動きを設定するパレットです">
185+ <fieldset class="palgroup" data-objid="palgroup2" title="動きを設定するパレットです">
186186 <legend class="pallegend"> Action Palette <span id="btnpauseanim" class="buttonstyle" title="要素の動きを一時的に停止します">Ⅱ</span></legend>
187187 <div class="palact palact0" data-objid="palact0" data-palid="0"></div>
188188 <div class="palact palact1" data-objid="palact1" data-palid="1"></div>
--- HtmlDrawApp/HTMLDrawApp/js/Common.js (revision 37)
+++ HtmlDrawApp/HTMLDrawApp/js/Common.js (revision 38)
@@ -231,7 +231,7 @@
231231 result = e.classList.contains(className);
232232 if (true == result) break;
233233
234- e = e.parent;
234+ e = e.parentElement;
235235 } while (null != e);
236236 }
237237 return e;
@@ -377,18 +377,19 @@
377377 // 引数のcallbackを1回呼び出します
378378 // callback: function callback(time)
379379 requestRenderFunc(callback) {
380- console.log('Request render function = ' + (callback ? callback.name : 'null'));
380+// console.log('Request render function = ' + (callback ? callback.name : 'null'));
381381 if (null != callback){
382382 this.renderQue.enqueue(callback);
383383
384384 // 描画loop
385- (function renderloop(time) {
385+ let loopfunc = function renderloop(time) {
386386 if (0 < this.renderQue.size()) {
387387 this.renderQue.dequeue()(time);
388- console.log('render func size=' + this.renderQue.size());
388+// console.log('render func size=' + this.renderQue.size());
389389 requestAnimationFrame(renderloop.bind(this));
390390 }
391- }.call(this,window.performance.now()));
391+ }
392+ loopfunc.call(this, window.performance.now());
392393 }
393394 }
394395 }
--- HtmlDrawApp/HTMLDrawApp/js/DispObj.js (revision 37)
+++ HtmlDrawApp/HTMLDrawApp/js/DispObj.js (revision 38)
@@ -216,9 +216,9 @@
216216 this.width = parseInt(ele.style.width);
217217 this.height = parseInt(ele.style.height);
218218 this.ObjID = ele.dataset.objid;
219- this.degree = ele.dataset.degree;
220- this.mirrorLRdeg = ele.dataset.mirrorlr;
221- this.mirrorUDdeg = ele.dataset.mirrorud;
219+ this.degree = parseFloat(ele.dataset.degree);
220+ this.mirrorLRdeg = parseInt(ele.dataset.mirrorlr);
221+ this.mirrorUDdeg = parseInt(ele.dataset.mirrorud);
222222 this.DOMbase.addEventListener('mousedown', this.onMouseDown.bind(this), false);
223223
224224 if( ele.children.length < 1 ){
@@ -286,12 +286,12 @@
286286 this.DOMbase.style.transform = 'rotateY(' + this.mirrorLRdeg + 'deg) rotateX(' + this.mirrorUDdeg + 'deg) rotateZ(' + this.degree + 'deg);';
287287 }
288288 mirrorLR() {
289- this.mirrorLRdeg = (0 < this.mirrorLRdeg) ? 0 : 180;
289+ this.mirrorLRdeg = (0 == this.mirrorLRdeg) ? 180 : 0;
290290 this.DOMbase.dataset.mirrorlr = this.mirrorLRdeg;
291291 window.renderLoop.requestRenderFunc(this.renderrollbox.bind(this));
292292 }
293293 mirrorUD() {
294- this.mirrorUDdeg = (0 < this.mirrorUDdeg) ? 0 : 180;
294+ this.mirrorUDdeg = (0 == this.mirrorUDdeg) ? 180 : 0;
295295 this.DOMbase.dataset.mirrorud = this.mirrorUDdeg;
296296 window.renderLoop.requestRenderFunc(this.renderrollbox.bind(this));
297297 }