import { _decorator, Component, Node, Size, UITransform } from 'cc';
import { widget_base } from './widget_base';
import { att_container } from '../../../data/data';
const { ccclass, property } = _decorator;

@ccclass('widget_container')
export class widget_container extends widget_base {
    @property(Node) img_zhaobutong:Node = null;
    private mContainerData:att_container = null;
    protected init(): void {
        if(this.mData.att.container_layer!=null){
            this.mContainerData = this.mData.att.container_layer
        }
    }

    protected update(dt: number): void {
    //    let node =  this.getIcon()
    //    let origin_width =  this.mData.att.width
    //    let origin_height = this.mData.att.height
    //    let cur_width = node.getComponent(UITransform).contentSize.width
    //    let cur_height = node.getComponent(UITransform).contentSize.height
    //    let scaleX = cur_width/origin_width
    //    let scaleY = cur_height/origin_height
 
    //    for (let index = 0; index < node.children.length; index++) {
    //         const element = node.children[index];
    //         element.setScale(scaleX,scaleY,1)
    //    }
    }
}


