1234567891011121314151617181920212223242526272829303132333435363738394041 |
- /**
- * Created by Zhong on 2017/11/24.
- */
- let projDisplayView = {
- datas: null,//just for view
- init:function () {
- this.datas = projectInfoObj.projectInfo.property.displaySetting;
- this.datas = this.datas === undefined ? { autoHeight: true, disPlayMainMaterial: true } : this.datas;
- $("#autoHeight").attr("checked",this.datas.autoHeight);
- $("#disPlayMainMaterial").attr("checked",this.datas.disPlayMainMaterial);
- //$('#disPlayMainMateria').prop('checked')
- },
- needUpdate: function(autoHeight, disPlayMainMaterial) {
- if(this.datas==null){
- return;
- }
- return autoHeight !== this.datas.autoHeight || disPlayMainMaterial !== this.datas.disPlayMainMaterial;
- },
- updateChecking:function (projectID,properties) {
- if(this.datas==null){
- return;
- }
- var autoHeight = $('#autoHeight').prop('checked');
- var disPlayMainMaterial = $('#disPlayMainMaterial').prop('checked');
- if(this.datas.autoHeight!==autoHeight||this.datas.disPlayMainMaterial!==disPlayMainMaterial){
- this.datas.autoHeight=autoHeight;
- this.datas.disPlayMainMaterial=disPlayMainMaterial;
- // let updateData = {sourceType: 'properties', updateType: 'update', updateData: {ID: projectID, 'property.displaySetting':this.datas}};
- properties['property.displaySetting'] = this.datas;
- // mixDatas.properties = properties;
- }
- }
- };
- $(document).ready(function () {
- $('#tab_display_setting').on('shown.bs.tab', function () {
- projDisplayView.init();
- });
- });
|