{"size": 1071, "ext": "js", "max_stars_repo_path": "lib/webix/sources/views/proxy.js", "max_stars_repo_name": "FarfallaHu/brainchop", "max_stars_repo_stars_event_min_datetime": "2021-12-16T19:25:17.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-30T14:48:04.000Z", "max_issues_repo_path": "lib/webix/sources/views/proxy.js", "max_issues_repo_name": "FarfallaHu/brainchop", "max_issues_repo_issues_event_min_datetime": "2022-03-30T00:03:38.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-30T00:03:38.000Z", "max_forks_repo_path": "lib/webix/sources/views/proxy.js", "max_forks_repo_name": "FarfallaHu/brainchop", "max_forks_repo_forks_event_min_datetime": "2022-03-29T23:16:54.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-29T23:39:00.000Z"}
{"max_stars_count": 16, "max_issues_count": 1, "max_forks_count": 2, "avg_line_length": 24.9069767442, "max_line_length": 54, "alphanum_fraction": 0.6638655462}
import base from "../views/view";
import {protoUI, ui} from "../ui/core";
import state from "../core/state";


const api = {
	name:"proxy",
	body_setter:function(value){
		state._parent_cell = this;
		this._body_cell = ui._view(value);
		this._viewobj.appendChild(this._body_cell._viewobj);
		return value;
	},
	getChildViews:function(){
		return [this._body_cell];
	},
	$setSize:function(x,y){
		base.api.$setSize.call(this, x,y);
		this._body_cell.$setSize(this.$width, this.$height);
	},
	$getSize:function(dx,dy){
		var selfSize = base.api.$getSize.call(this, dx, dy);
		var size = this._body_cell.$getSize(dx, dy);

		size[0] = Math.max(selfSize[0], size[0]);
		size[1] = Math.min(selfSize[1], size[1]);
		size[2] = Math.max(selfSize[2], size[2]);
		size[3] = Math.min(selfSize[3], size[3]);
		size[4] = Math.max(selfSize[4], size[4]);

		return size;
	},
	_replace:function(n){
		this._body_cell.destructor();
		this._body_cell = n;
		this._viewobj.appendChild(n._viewobj);
		this.resize();
	}
};


const view = protoUI(api,  base.view);
export default {api, view};