Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
W
WidgetUI
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
WuFeiyang
WidgetUI
Commits
dec1484c
Commit
dec1484c
authored
Dec 19, 2019
by
WuFeiyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
同步range
parent
001f891b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
55 additions
and
1 deletion
+55
-1
src/components/WaveView/setBasicParams.vue
src/components/WaveView/setBasicParams.vue
+55
-1
No files found.
src/components/WaveView/setBasicParams.vue
View file @
dec1484c
<
template
>
<
template
>
<div>
<div>
<div
v-show=
"isShowCog"
style=
"width:100%"
>
<div
v-show=
"isShowCog"
style=
"width:100%"
>
<b-button-group>
<b-button
variant=
"success"
@
click=
"synchronizeRange(1)"
>
SynchronizeX
</b-button>
<b-button
variant=
"info"
@
click=
"synchronizeRange(2)"
>
SynchronizeY
</b-button>
<b-button
variant=
"warning"
@
click=
"synchronizeRange(3)"
>
SynchronizeXY
</b-button>
</b-button-group>
<br>
<br>
<b-input-group
size=
"lg"
prepend=
"Channel Path"
>
<b-input-group
size=
"lg"
prepend=
"Channel Path"
>
<b-input
v-model=
"config.data.url.path"
></b-input>
<b-input
v-model=
"config.data.url.path"
></b-input>
<b-button
variant=
"info"
@
click=
"pathPoke"
>
poke
</b-button>
<b-button
variant=
"info"
@
click=
"pathPoke"
>
poke
</b-button>
</b-input-group><br>
</b-input-group>
<br>
<b-input-group
size=
"lg"
prepend=
"Channel TimePath"
>
<b-input-group
size=
"lg"
prepend=
"Channel TimePath"
>
<b-input
v-model=
"config.data.url.timePath"
></b-input>
<b-input
v-model=
"config.data.url.timePath"
></b-input>
<b-input-group-addon>
<b-input-group-addon>
...
@@ -161,6 +169,27 @@ export default class setBasicParams extends Vue {
...
@@ -161,6 +169,27 @@ export default class setBasicParams extends Vue {
this
.
createChannelChart
(
myPlot
,
data_initial
);
this
.
createChannelChart
(
myPlot
,
data_initial
);
}
}
synchronizeRange
(
kind
:
number
)
{
console
.
log
(
kind
);
var
myplot
=
this
.
wave
;
var
xRange
=
myplot
.
layout
.
xaxis
.
range
;
var
yRange
=
myplot
.
layout
.
yaxis
.
range
;
if
(
kind
==
1
)
{
PubSub
.
publish
(
'
SynchronizeX
'
,{
xrange
:
xRange
,
yrange
:
yRange
});
}
else
if
(
kind
==
2
)
{
PubSub
.
publish
(
'
SynchronizeY
'
,{
xrange
:
xRange
,
yrange
:
yRange
});
}
else
if
(
kind
==
3
)
{
PubSub
.
publish
(
'
SynchronizeXY
'
,{
xrange
:
xRange
,
yrange
:
yRange
});
}
}
async
viewLoad
(
Args
:
UpdatePayload
)
{
async
viewLoad
(
Args
:
UpdatePayload
)
{
this
.
getConfig
.
data
.
position
.
x1
=
""
;
this
.
getConfig
.
data
.
position
.
x1
=
""
;
...
@@ -252,7 +281,32 @@ export default class setBasicParams extends Vue {
...
@@ -252,7 +281,32 @@ export default class setBasicParams extends Vue {
Plotly
.
relayout
(
myPlot
,
layout_update
);
Plotly
.
relayout
(
myPlot
,
layout_update
);
});
});
PubSub
.
subscribe
(
'
SynchronizeX
'
,(
messageName
:
string
,
Args
:
any
)
=>
{
console
.
log
(
"
subscribe
"
);
console
.
log
(
Args
);
var
layout_update
=
{
xaxis
:
{
range
:
Args
.
xrange
}
};
Plotly
.
relayout
(
myPlot
,
layout_update
);
});
PubSub
.
subscribe
(
'
SynchronizeY
'
,(
messageName
:
string
,
Args
:
any
)
=>
{
console
.
log
(
"
subscribe
"
);
console
.
log
(
Args
);
var
layout_update
=
{
yaxis
:
{
range
:
Args
.
yrange
}
};
Plotly
.
relayout
(
myPlot
,
layout_update
);
});
myPlot
.
on
(
"
plotly_click
"
,
function
(
data
:
any
)
{
myPlot
.
on
(
"
plotly_click
"
,
function
(
data
:
any
)
{
//当前区域的范围
//当前区域的范围
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment