微件:ScenarioSimulator:修订间差异
跳到导航
跳到搜索
小无编辑摘要 |
小无编辑摘要 |
||
第1,069行: | 第1,069行: | ||
temp_obj.style.backgroundPosition = image_x + "px " + image_y + "px"; | temp_obj.style.backgroundPosition = image_x + "px " + image_y + "px"; | ||
temp_obj.style.backgroundSize = image_width + "px " + image_height + "px"; | temp_obj.style.backgroundSize = image_width + "px " + image_height + "px"; | ||
var temp_c1=Math.abs(tween_x-image_x),temp_c2=Math.abs(tween_y-image_y); | |||
var temp_c3=Math.abs(tween_width-image_width),temp_c4=Math.abs(tween_height-image_height); | |||
if( | if(temp_c1>0.1){return 0;} | ||
if( | if(temp_c2>0.1){return 0;} | ||
if(temp_c3>0.1){return 0;} | |||
if(temp_c4>0.1){return 0;} | |||
clearInterval(timer_id_tween); | clearInterval(timer_id_tween); | ||
timer_id_tween = -1; | timer_id_tween = -1; | ||
第1,524行: | 第1,526行: | ||
if(isNaN(temp_c1)) | if(isNaN(temp_c1)) | ||
{ | { | ||
temp_c1 = 0. | temp_c1 = 0.02; | ||
} | } | ||
if(image_adapt == "coverall") | if(image_adapt == "coverall") | ||
第1,610行: | 第1,612行: | ||
image_x = temp_d1;image_y = temp_d2;tween_x = temp_d3;tween_y = temp_d4; | image_x = temp_d1;image_y = temp_d2;tween_x = temp_d3;tween_y = temp_d4; | ||
image_width = temp_d5;image_height = temp_d6;tween_width = temp_d7;tween_height = temp_d8; | image_width = temp_d5;image_height = temp_d6;tween_width = temp_d7;tween_height = temp_d8; | ||
temp_c1 *= | temp_c1 *= 50; | ||
temp_d1 = (temp_d3 - temp_d1) / temp_c1;temp_d2 = (temp_d4 - temp_d2) / temp_c1; | temp_d1 = (temp_d3 - temp_d1) / temp_c1;temp_d2 = (temp_d4 - temp_d2) / temp_c1; | ||
temp_d5 = (temp_d7 - temp_d5) / temp_c1;temp_d6 = (temp_d8 - temp_d6) / temp_c1; | temp_d5 = (temp_d7 - temp_d5) / temp_c1;temp_d6 = (temp_d8 - temp_d6) / temp_c1; | ||
第1,618行: | 第1,620行: | ||
if(timer_id_tween == -1) | if(timer_id_tween == -1) | ||
{ | { | ||
timer_id_tween = setInterval("timer_tween(" + temp_d1 + "," + temp_d2 + "," + temp_d5 + "," + temp_d6 + ")", | timer_id_tween = setInterval("timer_tween(" + temp_d1 + "," + temp_d2 + "," + temp_d5 + "," + temp_d6 + ")",20) | ||
} | } | ||
return -1; | return -1; |