|
@@ -13,6 +13,8 @@ class BindTarget{
|
|
|
size:Size;
|
|
|
pos:Vec3;
|
|
|
rotation:number;
|
|
|
+ anchorPointX:number;
|
|
|
+ anchorPointY:number;
|
|
|
}
|
|
|
@ccclass('scene_page')
|
|
|
export class scene_page extends Component {
|
|
@@ -223,15 +225,18 @@ export class scene_page extends Component {
|
|
|
this.bindTarget.opacity = up_frame.transparent;
|
|
|
this.bindTarget.size = new Size(up_frame.size_width,up_frame.size_height)
|
|
|
this.bindTarget.pos = new Vec3(up_frame.pos_x,up_frame.pos_y)
|
|
|
-
|
|
|
+ this.bindTarget.anchorPointX = up_frame.anchor_point_x==undefined?0.5:up_frame.anchor_point_x
|
|
|
+ this.bindTarget.anchorPointY = up_frame.anchor_point_y==undefined?0.5:up_frame.anchor_point_y
|
|
|
+
|
|
|
let color_opactiy_tw_size = tween(this.bindTarget)
|
|
|
- .to( tweenDuration, { pos:n_pos,color: _color,opacity:frame.transparent,size:new Size(frame.size_width,frame.size_height),rotation:frame.rotation }, {
|
|
|
+ .to( tweenDuration, { pos:n_pos,color: _color,opacity:frame.transparent,size:new Size(frame.size_width,frame.size_height),rotation:frame.rotation, anchorPointX:frame.anchor_point_x, anchorPointY:frame.anchor_point_y }, {
|
|
|
onUpdate(tar:BindTarget){
|
|
|
self.content.getComponent(Sprite).color = tar.color;
|
|
|
self.content.getComponent(UIOpacity).opacity = tar.opacity;
|
|
|
// self.content.getComponent(UITransform).setContentSize(tar.size)
|
|
|
self.content.position = tar.pos
|
|
|
self.content.angle = tar.rotation;
|
|
|
+ self.content.getComponent(UITransform).setAnchorPoint(tar.anchorPointX, tar.anchorPointY)
|
|
|
}
|
|
|
}).call(()=>{
|
|
|
call()
|