Browse Source

提交代码。

Signed-off-by: zouap <zouap@pcl.ac.cn>
tags/v1.22.6.1^2
zouap 3 years ago
parent
commit
b5d8ed3c76
5 changed files with 14 additions and 16 deletions
  1. +8
    -8
      custom/public/rotation3D/rotation3D.js
  2. +1
    -1
      package-lock.json
  3. +2
    -5
      templates/base/footer.tmpl
  4. +2
    -1
      templates/home.tmpl
  5. +1
    -1
      web_src/js/index.js

+ 8
- 8
custom/public/rotation3D/rotation3D.js View File

@@ -154,7 +154,7 @@ var Rotation3D = window.Rotation3D = function (_opts) {
* y y起点 + (尺寸 * 正弦 * y压缩) - 元素宽度一半
*/
Rotation3D.prototype.itemStyle = function($item, index, rotation) {
console.log("itemStyle=" + rotation + " index=" + index);
//console.log("itemStyle=" + rotation + " index=" + index);
var parseSXY = circleMath.parseSXY(rotation, this);
var scale = parseSXY.scale;
var x = parseSXY.x;
@@ -219,7 +219,7 @@ Rotation3D.prototype.itemStyle = function($item, index, rotation) {
*/
Rotation3D.prototype.lineStyle = function($line, index, rotation) {
var rotate = circleMath.parseRotate(rotation, this)
console.log("lineStyle=" + rotation + " index=" + index);
//console.log("lineStyle=" + rotation + " index=" + index);

$line.css({
transform: 'rotate(' + rotate + 'deg)',
@@ -235,7 +235,7 @@ Rotation3D.prototype.lineStyle = function($line, index, rotation) {
Rotation3D.prototype.goTo = function (index) {
var self = this;
this.currenIndex = index;
console.log('goTo currenIndex', index);
//console.log('goTo currenIndex', index);
/**
* 1.计算floatIndex,用于控死amdiff
*/
@@ -319,7 +319,7 @@ Rotation3D.prototype.onAutoPlay = function () {
if (self.currenIndex < 0) {
self.currenIndex = self.length - 1
}
console.log("autoPlayTimer....");
//console.log("autoPlayTimer....");
self.goTo(self.currenIndex);
self.currenIndex--; //倒叙
}, this.autoPlayDelay)
@@ -331,12 +331,12 @@ Rotation3D.prototype.onAutoPlay = function () {
Rotation3D.prototype.onDrag = function () {
var self = this;
var startX, startY, moveX, moveY, endX, endY;
console.log("onDrag....");
//console.log("onDrag....");
// 拖拽:三个事件-按下 移动 抬起
//按下
this.$rotation.mousedown(function (e) {
startX = e.pageX; startY = e.pageY;
console.log("mousedown....");
//console.log("mousedown....");
// 移动
$(document).mousemove(function (e) {
// console.log('移动');
@@ -348,10 +348,10 @@ Rotation3D.prototype.onDrag = function () {
$(document).mouseup(function (e) {
endX = e.pageX; endY = e.pageY;
moveX = endX - startX; moveY = endY - startY;
console.log("mouseup....");
//console.log("mouseup....");
// 每40旋转一步
var moveIndex = parseInt(Math.abs(moveX) / 50)
console.log('moveIndex',moveIndex)
//console.log('moveIndex',moveIndex)
if (moveIndex > 0) {
// console.log(moveX<0 ? '向左' : '向右')
if (moveX < 0) { //向左


+ 1
- 1
package-lock.json View File

@@ -5439,7 +5439,7 @@
"gulp-tap": "^1.0.1",
"gulp-uglify": "^3.0.1",
"inquirer": "^6.2.1",
"jquery": "^3.5.1",
"jquery": "^3.4.0",
"less": "^3.7.0",
"map-stream": "^0.1.0",
"merge-stream": "^2.0.0",


+ 2
- 5
templates/base/footer.tmpl View File

@@ -12,7 +12,7 @@

{{template "base/footer_content" .}}

<script src="{{StaticUrlPrefix}}/js/jquery.js?v={{MD5 AppVer}}"></script>


@@ -41,15 +41,12 @@
<script src="{{StaticUrlPrefix}}/vendor/plugins/tribute/tribute.min.js"></script>
{{end}}
{{if .PageIsHome}}
<script src="{{StaticUrlPrefix}}/self/js/jquery.min.js?v={{MD5 AppVer}}"></script>
<script src="/home/home.js?v={{MD5 AppVer}}" type="text/javascript"></script>
<script rel="stylesheet" src="{{StaticUrlPrefix}}/vendor/plugins/jquery.particleground/jquery.particleground.min.js"></script>
{{end}}
<script src="{{StaticUrlPrefix}}/js/jquery.js?v={{MD5 AppVer}}"></script>
<script src="{{StaticUrlPrefix}}/fomantic/semantic.min.js?v={{MD5 AppVer}}"></script>
<script src="{{StaticUrlPrefix}}/js/index.js?v={{MD5 AppVer}}"></script>
{{template "custom/footer" .}}
{{if .PageIsHome}}
<script src="{{StaticUrlPrefix}}/vendor/plugins/jquery.particleground/jquery.particleground.min.js"></script>
<script src="/rotation3D/vue-2.6.10.min.js"></script>
<script src="/rotation3D/rotation3D.js?v={{MD5 AppVer}}"></script>
<script>


+ 2
- 1
templates/home.tmpl View File

@@ -222,7 +222,8 @@
</div>
</div>
<div class="am-mt-30"></div>

<script src="/self/js/jquery.min.js" type="text/javascript"></script>
<script src="/home/home.js?v={{MD5 AppVer}}" type="text/javascript"></script>


{{template "base/footer" .}}

+ 1
- 1
web_src/js/index.js View File

@@ -4959,7 +4959,7 @@ window.onOAuthLoginClick = function () {
// Pull SVGs via AJAX to workaround CORS issues with <use> tags
// https://css-tricks.com/ajaxing-svg-sprite/
$.get(`${window.config.StaticUrlPrefix}/img/svg/icons.svg`, (data) => {
const div = document.createElementNS('div');
const div = document.createElement('div');
div.style.display = 'none';
div.innerHTML = new XMLSerializer().serializeToString(data.documentElement);
document.body.insertBefore(div, document.body.childNodes[0]);


Loading…
Cancel
Save