1 |
- !function(r,Z){"use strict";var i="ht",I=i+".widget.",q=r[i],m=q.widget,f=q.Default,J=q.Color,o=f.getInternal(),C=o.fillRect,P=f.setImage,c=f.getImage,k=f.drawCenterImage,w=o.layout,K=f.def;q.IsGetter.caseSensitive=1,P("proerptypane_category",16,16,"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAACxSURBVHjaYrx68STD1p0H/zPgAN7u9owMeAALjGFubo4hefLkSQZCgAVdICwsjGHVqlUoYk5ufigu3LdrEyNWA0CasRmCrAEdMCFzYJrQXQAKIxhG5mP1ArpmbAGJzGchJsCQYwmkGcYHsRlB0YiumFDU4Y0FslxAlYRUWlqKIdnd3U3QBRhekJCQYHjx4gXRscCErhmZJjkQQTZjcwHRSRlmCDrAl5RZ0AOM1GgECDAAKhF1/YP8df0AAAAASUVORK5CYII="),P("proerptypane_sort",16,16,"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAACqSURBVHjaYrx68SQDMnBy8/u/b9cmRgYswMltD1DOBUWOCZmzdefB/8g0OkDXjGFAb28vA8h2EI3LBTgNQLcVmyuwuYARFgYgv2NqQA0LbGHAgksDNgOxASZkxbhofIAFm1NxRSNOA4gNA7wGkBsGjOgpEaa5uLiYwdvdnhFX/MNig4mQZhAoLmZFUYPMZyKkGQTw8ZlwOxs1DGC2oruG4pSINRBJAQABBgDKqW8M60DHlgAAAABJRU5ErkJggg=="),o.addMethod(f,{propertyPaneHeaderLabelColor:f.labelColor,propertyPaneHeaderLabelFont:f.labelFont,propertyPaneSelectBackground:J.highlight,propertyPaneHeaderBackground:J.headerBackground},!0),m.PropertyPane=function(x){var Q=this,k=Q._view=o.createView(1,Q),s=Q._propertyView=new m.PropertyView(x),V=Q._input=f.createElement("input"),Z=Q._canvas=o.createCanvas(k);Z.style.background=f.propertyPaneHeaderBackground||"",k.appendChild(Z),k.appendChild(V),k.appendChild(s.getView()),s.isVisible=function(I){var W=V.value,g=this._visibleFunc,E=this.getPropertyName(I);if(E&&W)if(Q._caseSensitive){if(E.indexOf(W)<0)return!1}else if(E.toLocaleLowerCase().indexOf(W.toLocaleLowerCase())<0)return!1;return g?g(I):!0},s.mp(function(c){var C=c.property;("indent"===C||"columnPosition"===C||"sortFunc"===C||"categorizable"===C)&&Q.iv()}),V.onkeydown=function(){s.ivm()},Q._sortFunc=function(q,Q){return f.sortFunc(s.getPropertyName(q),s.getPropertyName(Q))},new L(Q),Q.iv()},K(I+"PropertyPane",Z,{ms_v:1,ms_fire:1,ms_ac:["headerLabelColor","headerLabelFont","headerLabelAlign","headerLabels","caseSensitive","indent","toolbarHeight","headerHeight","selectBackground","categoryIcon","sortIcon","sortFunc"],_caseSensitive:!1,_headerLabels:["Property","Value"],_headerLabelColor:f.propertyPaneHeaderLabelColor,_headerLabelFont:f.propertyPaneHeaderLabelFont,_headerLabelAlign:"center",_indent:f.widgetIndent,_toolbarHeight:f.widgetTitleHeight,_headerHeight:f.widgetHeaderHeight,_selectBackground:f.propertyPaneSelectBackground,_categoryIcon:"proerptypane_category",_sortIcon:"proerptypane_sort",getPropertyView:function(){return this._propertyView},onPropertyChanged:function(){this.iv()},addProperties:function(C){this._propertyView.addProperties(C)},drawHeaderLabel:function(y,g,p,M,U,h){var x=this;y.save(),y.beginPath(),y.rect(p,M,U,h),y.clip(),f.drawText(y,g,x._headerLabelFont,x._headerLabelColor,p,M,U,h,x._headerLabelAlign),y.restore()},validateImpl:function(){var N=this,_=this._propertyView,A=N._indent,O=N._canvas,Q=N.getWidth(),z=N.getHeight(),Y=N._toolbarHeight,u=N._headerHeight,L=Y+u,f=N._selectBackground,X=N._input,T=N._headerLabels;o.setCanvas(O,Q,L);var x=o.initContext(O);o.translateAndScale(x,0,0,1),x.clearRect(0,0,Q,L),Y>0?(_.isCategorizable()&&C(x,0,0,A,Y,f),k(x,c(N._categoryIcon),A/2,Y/2),_.getSortFunc()&&C(x,A,0,A,Y,f),k(x,c(N._sortIcon),A+A/2,Y/2),w(X,2*A+1,1,Q-2*A-2,Y-2),X.style.visibility="visible"):X.style.visibility="hidden",A=_.getIndent();var d=A+_.getColumnPosition()*(Q-A);u>0&&(N.drawHeaderLabel(x,T[0],0,Y,d,u),N.drawHeaderLabel(x,T[1],d+1,Y,Q-d-1,u),o.drawVerticalLine(x,_.getColumnLineColor(),d,Y,u),C(x,0,L-1,Q,1,_.getRowLineColor())),w(_,0,L,Q,z-L),x.restore()}});var L=function(f){var N=this;N.pp=f,N.pv=f.getPropertyView(),N.addListeners()};K(L,Z,{ms_listener:1,getView:function(){return this.pp._view},setCursor:function(f){this.getView().style.cursor=f},handle_mousedown:function(D){f.isLeftButton(D)&&this.handle_touchstart(D)},handleWindowMouseMove:function($){this.handleWindowTouchMove($)},handleWindowMouseUp:function(K){this.handleWindowTouchEnd(K)},lp:function(Q){return f.getLogicalPoint(Q,this.getView())},handle_mousemove:function(z){if(!o.getDragger()){var R=this,Z=R.pp,Y=R.pv,m=Z.getIndent(),N=Z.getToolbarHeight(),r=Z.getHeaderHeight(),I=R.lp(z),l=I.x,j=I.y;if(R.setCursor("default"),N>j)2*m>l&&R.setCursor("pointer");else if(N+r>j){m=Y.getIndent();var k=m+Y.getColumnPosition()*(Z.getWidth()-m);l>k-10&&k+10>l&&R.setCursor("ew-resize")}}},handle_touchstart:function(F){var U=this,a=U.pp;if(F.target!==a._input){f.preventDefault(F);var U=this,L=U.pv,l=a.getIndent(),X=a.getToolbarHeight(),$=a.getHeaderHeight(),J=U.lp(F),I=J.x,G=J.y;if(U.setCursor("default"),X>G)l>I?L.setCategorizable(!L.isCategorizable()):2*l>I&&L.setSortFunc(L.getSortFunc()?null:a.getSortFunc());else if(X+$>G){l=L.getIndent();var W=l+L.getColumnPosition()*(a.getWidth()-l);I>W-10&&W+10>I&&f.startDragging(U,F)}}},handleWindowTouchMove:function($){var X=this,o=X.pp,O=X.pv,I=X.lp($).x,r=O.getIndent(),q=o.getWidth(),c=q-r;if(c>16){var z=(I-r)/c,B=16/c;B>z&&(z=B),z>1-B&&(z=1-B),O.setColumnPosition(z)}},handleWindowTouchEnd:function(){}})}("undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:this,Object);
|