xzw 4 years ago
parent
commit
b03546085c
1 changed files with 4 additions and 2 deletions
  1. 4 2
      web/public/static/js/main_2020_show.js

+ 4 - 2
web/public/static/js/main_2020_show.js

@@ -20776,10 +20776,12 @@ window.Modernizr = function(n, e, t) {
 
                 //zoom动画  方奕卓  相机缩放 
                 var currentGuide = player.model.getHeroDescriptorByIndex(player.director.currentItem)  
-                if(currentGuide.zoom){
+                if(currentGuide.zoom && currentGuide.zoom != this.player.zoomLevel){
                     this.player.zoomEnabled = true;
+                    var startZoom = this.player.zoomLevel
                     var zoom = function(e, d) { 
-                        this.player.zoomTo(e * currentGuide.zoom.toFixed(2), true)        
+                        var zoomLevel = currentGuide.zoom.toFixed(2) * e + startZoom * (1-e);
+                        this.player.zoomTo( zoomLevel, true)        
 
                     }.bind(this)
                     p.start(zoom, 2000, null, 0, d.easeOutQuad, "zoom")