tweaked preformance of preview operations

This commit is contained in:
printempw 2016-04-03 11:57:13 +08:00
parent 36eea7e767
commit 37381fdf60
4 changed files with 20 additions and 15 deletions

View File

@ -2,7 +2,7 @@
* @Author: printempw
* @Date: 2016-03-27 09:43:57
* @Last Modified by: printempw
* @Last Modified time: 2016-04-02 20:20:52
* @Last Modified time: 2016-04-03 11:55:42
*/
'use strict';
@ -27,6 +27,7 @@ $(document).ready(function(){
show2dPreview();
} else {
init3dCanvas();
MSP.setStatus("rotation", false);
}
});
@ -34,13 +35,17 @@ $(document).ready(function(){
$(window).resize(init3dCanvas);
// Change 3D preview status
$("[title='Movements']").click(function(){
$('.fa-pause').click(function(){
MSP.setStatus("movements", !MSP.getStatus("movements"));
if ($(this).hasClass('fa-pause'))
$(this).removeClass('fa-pause').addClass('fa-play');
else
$(this).removeClass('fa-play').addClass('fa-pause');
});
$("[title='Running']").click(function(){
$('.fa-forward').click(function(){
MSP.setStatus("running", !MSP.getStatus("running"));
});
$("[title='Rotation']").click(function(){
$('.fa-repeat').click(function(){
MSP.setStatus("rotation", !MSP.getStatus("rotation"));
});

View File

@ -79,9 +79,9 @@
<h3 class="box-title">皮肤预览
<small><a id="preview" href="javascript:show2dPreview();">切换 2D 预览</a></small>
<div class="operations">
<i data-toggle="tooltip" data-placement="bottom" title="Movements" class="fa fa-pause"></i>
<i data-toggle="tooltip" data-placement="bottom" title="Running" class="fa fa-forward"></i>
<i data-toggle="tooltip" data-placement="bottom" title="Rotation" class="fa fa-repeat"></i>
<i data-toggle="tooltip" data-placement="bottom" title="行走" class="fa fa-pause"></i>
<i data-toggle="tooltip" data-placement="bottom" title="奔跑" class="fa fa-forward"></i>
<i data-toggle="tooltip" data-placement="bottom" title="旋转" class="fa fa-repeat"></i>
</div>
</h3>
</div><!-- /.box-header -->

View File

@ -3,7 +3,7 @@
* @Author: printempw
* @Date: 2016-01-21 13:56:40
* @Last Modified by: printempw
* @Last Modified time: 2016-03-27 09:45:18
* @Last Modified time: 2016-04-03 11:50:47
*/
require "../libraries/session.inc.php";
$data['style'] = <<< 'EOT'
@ -53,9 +53,9 @@ View::show('header', $data);
<h3 class="box-title">皮肤预览
<small><a id="preview" href="javascript:show2dPreview();">切换 2D 预览</a></small>
<div class="operations">
<i data-toggle="tooltip" data-placement="bottom" title="Movements" class="fa fa-pause"></i>
<i data-toggle="tooltip" data-placement="bottom" title="Running" class="fa fa-forward"></i>
<i data-toggle="tooltip" data-placement="bottom" title="Rotation" class="fa fa-repeat"></i>
<i data-toggle="tooltip" data-placement="bottom" title="行走" class="fa fa-pause"></i>
<i data-toggle="tooltip" data-placement="bottom" title="奔跑" class="fa fa-forward"></i>
<i data-toggle="tooltip" data-placement="bottom" title="旋转" class="fa fa-repeat"></i>
</div>
</h3>
</div><!-- /.box-header -->

View File

@ -3,7 +3,7 @@
* @Author: printempw
* @Date: 2016-03-18 21:41:21
* @Last Modified by: printempw
* @Last Modified time: 2016-03-27 09:45:12
* @Last Modified time: 2016-04-03 11:51:49
*/
require "../libraries/session.inc.php";
$data['style'] = <<< 'EOT'
@ -62,9 +62,9 @@ View::show('header', $data);
<h3 class="box-title">即时预览
<small><a id="preview" href="javascript:show2dPreview();">切换 2D 预览</a></small>
<div class="operations">
<i data-toggle="tooltip" data-placement="bottom" title="Movements" class="fa fa-pause"></i>
<i data-toggle="tooltip" data-placement="bottom" title="Running" class="fa fa-forward"></i>
<i data-toggle="tooltip" data-placement="bottom" title="Rotation" class="fa fa-repeat"></i>
<i data-toggle="tooltip" data-placement="bottom" title="行走" class="fa fa-pause"></i>
<i data-toggle="tooltip" data-placement="bottom" title="奔跑" class="fa fa-forward"></i>
<i data-toggle="tooltip" data-placement="bottom" title="旋转" class="fa fa-repeat"></i>
</div>
</h3>
</div><!-- /.box-header -->