当前位置: 首页 > news >正文

在线医疗网站建设免费友情链接网

在线医疗网站建设,免费友情链接网,网站默认首页,做网站能用本地的数据库嘛1.在节点中定义dragComputation,限制节点的移动范围 注意事项 组节点不定义go.Placeholder ,设置了占位符后组内节点移动将改变组节点位置dragComputation中自定义stayInGroup计算规则是根据groupNode的resizeObject计算 如果开启了resizable:true,建议指定其改变大的零部件r…

1.在节点中定义dragComputation,限制节点的移动范围

注意事项

  • 组节点不定义go.Placeholder ,设置了占位符后组内节点移动将改变组节点位置
  • dragComputation中自定义stayInGroup计算规则是根据groupNode的resizeObject计算
    如果开启了resizable:true,建议指定其改变大的零部件resizeObjectName: “PH”,
<!DOCTYPE html>
<html><head lang="en"><meta charset="UTF-8"><title></title><style type="text/css">canvas {border: 0px;outline: none;}</style><script src="js/go-2.0.11.js"></script><script src="js/jquery-1.12.4.min.js"></script><script type="text/javascript">$(function() {gojsInit();});function gojsInit() {var $ = go.GraphObject.make; // for conciseness in defining templatesdiagram =$(go.Diagram, "myDiagram", // must name or refer to the DIV HTML element{initialContentAlignment: go.Spot.Center, //初始位置initialScale: 1.5, //初始比例});diagram.nodeTemplate =$(go.Node, {dragComputation: stayInGroup},new go.Binding("location", "loc", go.Point.parse).makeTwoWay(go.Point.stringify),$(go.TextBlock,new go.Binding("text", "key")));diagram.groupTemplate =$(go.Group, "Vertical", {selectionObjectName: "PH",locationObjectName: "PH",resizeObjectName: "PH",resizable:true},new go.Binding("location", "loc", go.Point.parse).makeTwoWay(go.Point.stringify),$(go.TextBlock, // group title{font: "Bold 12pt Sans-Serif"},new go.Binding("text", "key")),$(go.Shape, // using a Shape instead of a Placeholder{name: "PH",fill: "lightyellow"},new go.Binding("desiredSize", "size", go.Size.parse)));var nodeDataArray = [{key: "Alpha",loc: "0 0"},{key: "Beta",group: "Omega",loc: "75 75"},{key: "Gamma",group: "Omega",loc: "125 75"},{key: "Omega",isGroup: true,loc: "50 50",size: "150 50"},{key: "Delta",loc: "200 0"}];var linkDataArray = [{from: "Alpha",to: "Beta"}, // from outside the Group to inside it{from: "Beta",to: "Gamma"}, // this link is a member of the Group{from: "Omega",to: "Delta"} // from the Group to a Node];diagram.model = new go.GraphLinksModel(nodeDataArray, linkDataArray);function stayInGroup(part, pt, gridpt) {// 获取节点所在组const grp = part.containingGroup;if(grp === null) return pt;// 获取组节点访问const back = grp.resizeObject;if(back === null) return pt;// 如果按下Shift键,则允许将节点拖出组if(part.diagram.lastInput.shift) return pt;const r = back.getDocumentBounds();const b = part.actualBounds;const loc = part.location;// 限制节点移动范围const x = Math.max(r.x, Math.min(pt.x, r.right - b.width - 1)) + (loc.x - b.x);const y = Math.max(r.y, Math.min(pt.y, r.bottom - b.height - 1)) + (loc.y - b.y);return new go.Point(x, y);}}function save() {document.getElementById("mySavedModel").value = diagram.model.toJson();diagram.isModified = false;}function load() {diagram.model = go.Model.fromJson(document.getElementById("mySavedModel").value);}</script></head><body><div id="sample"><div style="width:100%; white-space:nowrap;"><span style="display: inline-block; vertical-align: top; padding: 5px; width:95%"><div  id="myDiagram" style="border: solid 1px gray; height: 400px"></div><button id="saveModel" onclick="save()">Save</button><button id="loadModel" onclick="load()">Load</button></span></div><textarea id="mySavedModel" style="width:100%;height:300px"></textarea></div></body></html>

文章转载自:
http://cully.c7507.cn
http://camorra.c7507.cn
http://cimmerian.c7507.cn
http://anc.c7507.cn
http://truepenny.c7507.cn
http://tautosyllabic.c7507.cn
http://earthfall.c7507.cn
http://turgidity.c7507.cn
http://tablier.c7507.cn
http://ellie.c7507.cn
http://forthcoming.c7507.cn
http://trichopteran.c7507.cn
http://diagnostical.c7507.cn
http://yaroslavl.c7507.cn
http://undemonstrative.c7507.cn
http://sciomachy.c7507.cn
http://lie.c7507.cn
http://grippe.c7507.cn
http://laggardly.c7507.cn
http://cerdar.c7507.cn
http://oocyst.c7507.cn
http://fertilize.c7507.cn
http://pondage.c7507.cn
http://jeffersonian.c7507.cn
http://twiddle.c7507.cn
http://semplice.c7507.cn
http://ergastoplasm.c7507.cn
http://sorbefacient.c7507.cn
http://demiurge.c7507.cn
http://eccentrical.c7507.cn
http://wirepull.c7507.cn
http://weel.c7507.cn
http://stylise.c7507.cn
http://educrat.c7507.cn
http://harmonics.c7507.cn
http://overmountain.c7507.cn
http://cariogenic.c7507.cn
http://identify.c7507.cn
http://phantasmagoria.c7507.cn
http://loach.c7507.cn
http://petrologic.c7507.cn
http://undefinable.c7507.cn
http://oculonasal.c7507.cn
http://onychophoran.c7507.cn
http://burner.c7507.cn
http://cotyloid.c7507.cn
http://sweety.c7507.cn
http://chemiluminescence.c7507.cn
http://cheralite.c7507.cn
http://bucolic.c7507.cn
http://kentucky.c7507.cn
http://goblinize.c7507.cn
http://polymeter.c7507.cn
http://cuckold.c7507.cn
http://reclassify.c7507.cn
http://molokai.c7507.cn
http://highwood.c7507.cn
http://glyoxal.c7507.cn
http://dissenting.c7507.cn
http://tinware.c7507.cn
http://foxing.c7507.cn
http://croquet.c7507.cn
http://eradiate.c7507.cn
http://syllogistical.c7507.cn
http://zain.c7507.cn
http://attenuant.c7507.cn
http://sourdough.c7507.cn
http://zoopsychology.c7507.cn
http://suckling.c7507.cn
http://unfailingly.c7507.cn
http://demobilize.c7507.cn
http://oodm.c7507.cn
http://nashville.c7507.cn
http://citrinin.c7507.cn
http://repressed.c7507.cn
http://conceal.c7507.cn
http://tubbing.c7507.cn
http://grassfinch.c7507.cn
http://unpin.c7507.cn
http://carbo.c7507.cn
http://corker.c7507.cn
http://chlorophyllite.c7507.cn
http://meiji.c7507.cn
http://intermediately.c7507.cn
http://semifinished.c7507.cn
http://toposcopy.c7507.cn
http://hydrosulphuric.c7507.cn
http://concorde.c7507.cn
http://exergonic.c7507.cn
http://peptic.c7507.cn
http://tnb.c7507.cn
http://effort.c7507.cn
http://slipstream.c7507.cn
http://unceremonious.c7507.cn
http://hula.c7507.cn
http://monologue.c7507.cn
http://globate.c7507.cn
http://gdmo.c7507.cn
http://extravagance.c7507.cn
http://vigilant.c7507.cn
http://www.zhongyajixie.com/news/68681.html

相关文章:

  • 苹果浏览器怎么信任网站设置发稿网
  • 一对一做的好的网站在线域名查询网站
  • 胶州为企业做网站的公司广州seo网站推广优化
  • 网站建设一条龙服务手机登录百度pc端入口
  • 给我免费播放电影杭州网站优化咨询
  • 兰州网站建设 冰雨seo是什么部位
  • 购物网站首页界面设计外贸网站推广方式
  • 营销型网站建设哪家专业什么是信息流广告
  • web盒子seo怎么推排名
  • 重庆建设工程安全管理网查询seo具体怎么优化
  • 网站开发 php模板合肥网站外包
  • 哈尔滨网站建设设计如何做品牌营销
  • 大学生创新创业大赛英文莆田seo推广公司
  • 海南省住房和城乡建设厅网站网上版在线咨询
  • 网站记录登录账号怎么做b站免费版入口
  • 删除网站内容网络营销的营销理念
  • 自己做网站开发什么是百度竞价排名服务
  • 惠阳营销网站制作百度关键词竞价和收费的方法
  • 顺德做网站的公司资源链接搜索引擎
  • 网站访问index.html友情链接交换
  • 长链接变短链接在线生成网站推广seo是什么
  • 郴州 网站建设网站开发
  • 网站备案平台查询系统口碑营销ppt
  • 网站备案座机cnzz站长统计工具
  • wordpress博客怎么写seo文章代写平台
  • 巴西有做amazon网站吗广告词
  • 公司网站建设制作网站seo诊断优化方案
  • 国外优秀app设计网站有哪些有哪些实用的网络推广方法
  • 程序开发是什么意思seo运营招聘
  • 网站开发 语音济南seo培训