全文预览已结束
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
Javascript写的div布局yhm.NsLayout = function(paras) this.paras = paras; this.events = new yhm.Delegate();yhm.NsLtotype.beginPos=-1;yhm.NsLtotype.render=function() var n = ; var m=; m.push(); m.push(); m.push(); m.push(); yhm.render(m.join(),this.paras.renderTo); this.afterRender();yhm.NsLtotype.afterRender=function() var n = ; var o1 = yhm.getObject(this.paras.north); var o2 = this.paras.south?yhm.getObject(this.paras.south):null; var o = yhm.g(n+_split) var me=this; yhm.attachEvent(o,mousedown,(function(obj) return function(e) emis_layout_down(obj,e); )(me); yhm.attachEvent(document,mousemove,(function(obj) return function(e) emis_layout_move(obj,e); )(me); yhm.attachEvent(document,mouseup, (function(obj) return function(e) emis_layout_up(obj,e); )(me); o = null; o1.paras.renderTo = n+_n; o1.render(); if (o2!=null) o2.paras.renderTo = n+_s; o2.render(); o1=null; o2=null;yhm.NsLtotype.resize=function() var s = yhm.getSize(this.paras); var w = s.width; var h = s.height; var n = ; if(!this.paras.northHeight) this.paras.northHeight = h-12-this.paras.southHeight; e(n+_n).setHeight(this.paras.northHeight) yhm.e.setWidth(w-10); h=h-14-this.paras.northHeight; e(n+_s).setHeight(h0?0:h); yhm.e.setWidth(w-10); e.ele = null; yhm.getObject(this.paras.north).resize(); if(this.paras.south) yhm.getObject(this.paras.south).resize(); if(this.paras.children) var c=this.paras.children;var i=c.length; while(i-) yhm.getObject(ci).resize(); c=null; ;yhm.NsLtotype.addChild=function(n) if(!this.paras.children) this.paras.children=; this.paras.childrenthis.paras.children.length=n;function emis_layout_down(obj,e) var n=; var o = yhm.g(emis_line) if (o = null) o = document.createElement(SPAN); o.id = emis_line; o.className = emis_grid_line; document.body.appendChild(o); obj.beginPos = yhm.clientY(e); o.style.top = obj.beginPos-2 + px; o.style.width = yhm.g(n+_split).clientWidth+px; o.style.height = 4px; o.style.left= (yhm.g(n+_split).getBoundingClientRect().left + document.documentElement.scrollLeft-2) + px; o.style.display = ; o = null; document.body.setCapture();function emis_layout_move(obj,e) if (obj.beginPos!=-1) var y=yhm.clientY(e); yhm.g(emis_line).style.top= (y-2)+ px; if(document.selection) document.selection.empty(); else window.getSelection().removeAllRanges(); function emis_layout_up(obj,e) if (obj.beginPos!=-1) document.body.releaseCapture(); obj.paras.northHeight =parseI
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025年低空经济产业集群发展报告
- 家装客户工程赔偿协议书
- 2026-2031中国骨科耗材市场发展趋势分析研究报告
- 医院治安保卫应急预案
- 送气工练习试题及答案
- 2025年设备维护保养培训考试试题及答案
- 2025质量管理体系注册审核员题库附答案
- 低压电工考试题及答案
- 2025年学校食堂食品安全管理人员考卷附答案
- 生物医药领域专利链接制度实施效果
- 2025年高校教师资格证考试高等教育心理学知识必考题库及答案(共230题)
- 《数据采集技术》课件-使用 urllib 爬取网页
- 国开电大《中国法律史》形考任务1-3
- 畜牧场兽医聘用合同样本
- 【MOOC】英文技术写作-东南大学 中国大学慕课MOOC答案
- 山东名校考试联盟2024-2025学年高二上学期11月期中检测生物试题
- 中华人民共和国学前教育法-知识培训
- 2024年初中历史新课标考试题库(含答案)
- 妇科室医疗质量与安全管理制度
- 仁爱版初中英语知识点归纳(七-九年级全册)
- 从创意到创业智慧树知到期末考试答案章节答案2024年湖南师范大学
评论
0/150
提交评论