1/** 2 * created by WEVEN on 2020-03-02 3 * ìëì ìì¤ë WEVENì ì ìê¶ì´ ìì¼ë¯ë¡ ë¬´ë¨ ì¬ì© ë° ì¬ ë°°í¬ë¥¼ ê¸í©ëë¤. 4 */ 5var ToolTab = function() { 6 this.targetLine = null; 7 8 this.onBtnClick = function(e) { 9 } 10} 11 12bm.extend(ToolBase , ToolTab); 13 14ToolTab.prototype.onChangeTarget = function(target) { 15 if(!target || $(target).closest('[data-wv-tab]').length != 1) { 16 return; 17 } 18 const _this = this; 19 var i, btn; 20 var len = _this.toolBtnList.length; 21 for(i = 0; i < len; i++) { 22 btn = _this.toolBtnList[i]; 23 btn.changeTarget(target); 24 } 25 26 if (_this.element && !wvAdminIFrameBridge.iframeWindow.document.querySelector(`[data-wv-toolset="${_this.element.getAttribute('data-wv-toolset')}"]`)) { 27 wvAdminIFrameBridge.iframeWindow.document.body.prepend(_this.element); 28 _this.deactive(); 29 _this.active(); 30 } 31 32 _this.show(); 33 _this.reposition(); 34} 35 36ToolTab.prototype.reposition = function () { 37 var tabTarget = null; 38 if( this.targetElement ){ 39 40 if($(this.targetElement).closest('[data-wv-tab]').length) tabTarget = this.targetElement; 41 else return; 42 43 var top = $(tabTarget).offset().top - this.element.offsetHeight - 10; 44 var left = $(tabTarget).offset().left; 45 var scrollTop = $(this.innerWindow.document).scrollTop(); 46 47 if( top < 0 || top < scrollTop ) { 48 top = $(tabTarget).offset().top + tabTarget.offsetHeight + 10; 49 } 50 51 // íë©´ì ë²ì´ëë ê²½ì° 52 if(window["wvAdminIFrameBridge"] && $(this.innerWindow.document.body).width() - $(this.element)[0].offsetWidth < left){ 53 left = $(tabTarget).offset().left + tabTarget.offsetWidth - $(this.element)[0].offsetWidth; 54 } 55 56 if(left < 0) left = 0; 57 58 $(this.element).css( { "top" : top , "left" : left }); 59 60 } 61} 62 63ToolTab.prototype.addEvent = function() { 64} 65 66ToolTab.prototype.removeEvent = function() { 67} 68
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.