|
@@ -36,6 +36,10 @@ export class new_frame extends Component {
|
|
|
|
|
|
@property(Node) btn_update_cur_pos:Node = null;
|
|
|
|
|
|
+
|
|
|
+ @property(Node) scale_x:Node = null;
|
|
|
+ @property(Node) scale_y:Node = null;
|
|
|
+
|
|
|
private m_up_frame:ani_frame = null;
|
|
|
private m_create_call = null;
|
|
|
private m_edit_call = null;
|
|
@@ -147,6 +151,8 @@ export class new_frame extends Component {
|
|
|
this.rotation.on('editing-did-ended', this.change, this);
|
|
|
this.anchor_point_x.on('editing-did-ended', this.change, this);
|
|
|
this.anchor_point_y.on('editing-did-ended', this.change, this);
|
|
|
+ this.scale_x.on('editing-did-ended', this.change, this);
|
|
|
+ this.scale_y.on('editing-did-ended', this.change, this);
|
|
|
}
|
|
|
|
|
|
close(){
|
|
@@ -179,6 +185,15 @@ export class new_frame extends Component {
|
|
|
// console.log('x=',this.m_data.rotation_x, 'y=',this.m_data.rotation_y)
|
|
|
ani_frame_data.anchor_point_x = this.m_data.anchor_point_x;
|
|
|
ani_frame_data.anchor_point_y = this.m_data.anchor_point_y;
|
|
|
+ if(this.m_data.scale_x==null||this.m_data.scale_x==undefined){
|
|
|
+ this.m_data.scale_x = 1
|
|
|
+ }
|
|
|
+
|
|
|
+ if(this.m_data.scale_y==null||this.m_data.scale_y==undefined){
|
|
|
+ this.m_data.scale_y = 1
|
|
|
+ }
|
|
|
+ ani_frame_data.scale_x = this.m_data.scale_x
|
|
|
+ ani_frame_data.scale_y = this.m_data.scale_y
|
|
|
console.log("ani_frame_data//",ani_frame_data)
|
|
|
if(this.checkAnchorXY()) {
|
|
|
this.m_create_call(ani_frame_data)
|
|
@@ -225,10 +240,18 @@ export class new_frame extends Component {
|
|
|
if(up_frame.anchor_point_y==undefined||up_frame==null) {
|
|
|
up_frame.anchor_point_y = 0.5
|
|
|
}
|
|
|
+ if(up_frame.scale_x==undefined||up_frame==null) {
|
|
|
+ up_frame.scale_x = 1
|
|
|
+ }
|
|
|
+ if(up_frame.scale_y==undefined||up_frame==null) {
|
|
|
+ up_frame.scale_y = 1
|
|
|
+ }
|
|
|
}
|
|
|
this.m_data.rotation = up_frame?up_frame.rotation:0
|
|
|
this.m_data.anchor_point_x = up_frame?up_frame.anchor_point_x:att.anchor_x
|
|
|
this.m_data.anchor_point_y = up_frame?up_frame.anchor_point_y:att.anchor_y
|
|
|
+ this.m_data.scale_x = up_frame.scale_x
|
|
|
+ this.m_data.scale_y = up_frame.scale_y
|
|
|
this.lab_origin_pos.getComponent(Label).string = `(x:${Math.floor(att.x)},y:${Math.floor(att.y)})`
|
|
|
this.lab_origin_size.getComponent(Label).string = `(w:${att.width},h:${att.height})`
|
|
|
this.initAtt()
|
|
@@ -263,6 +286,16 @@ export class new_frame extends Component {
|
|
|
this.size_height.getComponent(EditBox).string = this.m_data.size_height.toString()
|
|
|
this.color.getComponent(EditBox).string = this.m_data.color.toString()
|
|
|
this.transparent.getComponent(EditBox).string = this.m_data.transparent.toString()
|
|
|
+
|
|
|
+ if(this.m_data.scale_x==undefined||this.m_data.scale_x==null) {
|
|
|
+ this.m_data.scale_x = 1;
|
|
|
+ }
|
|
|
+ if(this.m_data.scale_y==undefined||this.m_data.scale_y==null) {
|
|
|
+ this.m_data.scale_y = 1;
|
|
|
+ }
|
|
|
+ this.scale_x.getComponent(EditBox).string = this.m_data.scale_x.toString()
|
|
|
+ this.scale_y.getComponent(EditBox).string = this.m_data.scale_y.toString()
|
|
|
+
|
|
|
if(this.m_data.rotation==undefined){
|
|
|
this.m_data.rotation = 0;
|
|
|
}
|
|
@@ -297,6 +330,9 @@ export class new_frame extends Component {
|
|
|
this.m_data.size_height = parseInt(this.size_height.getComponent(EditBox).string)
|
|
|
this.m_data.color = this.color.getComponent(EditBox).string
|
|
|
this.m_data.transparent = parseInt(this.transparent.getComponent(EditBox).string)
|
|
|
+
|
|
|
+ this.m_data.scale_x = parseInt(this.scale_x.getComponent(EditBox).string)
|
|
|
+ this.m_data.scale_y = parseInt(this.scale_y.getComponent(EditBox).string)
|
|
|
}
|
|
|
|
|
|
checkAnchorXY():boolean {
|