From cc3cc145a8cc38dcb2fc123b671fac0c39450a33 Mon Sep 17 00:00:00 2001
From: nnnjjj123 <494715143@qq.com>
Date: Fri, 06 Nov 2020 17:06:03 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
widgets/Plot/Widget.js | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 57 insertions(+), 0 deletions(-)
diff --git a/widgets/Plot/Widget.js b/widgets/Plot/Widget.js
new file mode 100644
index 0000000..fe6f9e3
--- /dev/null
+++ b/widgets/Plot/Widget.js
@@ -0,0 +1,57 @@
+///////////////////////////////////////////////////////////////////////////
+// Copyright © 2020 zhongsong. All Rights Reserved.
+// 模块描述:河流水面线分析
+///////////////////////////////////////////////////////////////////////////
+define([
+ 'dojo/_base/declare',
+ 'dojo/_base/lang',
+ 'dojo/_base/array',
+ 'dojo/_base/html',
+ 'dojo/topic',
+ 'jimu/BaseWidget'
+],
+ function (declare,
+ lang,
+ array,
+ html,
+ topic,
+ BaseWidget
+ ) {
+ return declare([BaseWidget], {
+ baseClass: 'jimu-widget-Plot',
+ name: 'Plot',
+ type: '',
+ layer: null,
+ plot: null,
+ startup: function () {
+
+ var that = this;
+ $('.jimu-widget-Plot .plot-box ul li button').click(function () {
+ window.dcViewer.contextMenu.enable=false;
+ var type = $(this).attr('drawtype');
+ that.draw(type);
+ })
+
+ $('.xx').click(function () {
+ $('.jimu-widget-Plot').hide()
+ window.dcViewer.contextMenu.enable=true;
+ })
+
+ },
+
+ draw: function (type) {
+ var that = this;
+ that.plot && that.plot.draw(type, overlay => {
+ that.layer.addOverlay(overlay)
+ that.plot.edit(overlay)
+ })
+ },
+
+ onOpen: function () {
+ this.layer = new DC.VectorLayer('layer')
+ dcViewer.addLayer(this.layer)
+ this.plot = new DC.Plot(dcViewer)
+ }
+
+ });
+ });
\ No newline at end of file
--
Gitblit v1.9.3