Skip to content

Commit

Permalink
Fix button apply
Browse files Browse the repository at this point in the history
  • Loading branch information
algenty committed Jan 24, 2020
1 parent 7efe2a0 commit fee0569
Show file tree
Hide file tree
Showing 9 changed files with 229 additions and 221 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ See more example at draw.io
### Fixed
- Fix endless loading when edit graph [(issue #102)](https://github.com/algenty/grafana-flowcharting/issues/102)
- Fix error on edit mode for timeserie [(issue #100)](https://github.com/algenty/grafana-flowcharting/issues/100)
- Fix "Apply button" in inspect mode [(issue #104)](https://github.com/algenty/grafana-flowcharting/issues/104)

## [[0.6.0]](https://algenty.github.io/flowcharting-repository/archives/agenty-flowcharting-panel-0.6.0.zip) - 2019-12-20
### Added
Expand Down
402 changes: 201 additions & 201 deletions dist/LICENSE

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ See more example at draw.io
### Fixed
- Fix endless loading when edit graph [(issue #102)](https://github.com/algenty/grafana-flowcharting/issues/102)
- Fix error on edit mode for timeserie [(issue #100)](https://github.com/algenty/grafana-flowcharting/issues/100)
- Fix "Apply button" in inspect mode [(issue #104)](https://github.com/algenty/grafana-flowcharting/issues/104)

## [[0.6.0]](https://algenty.github.io/flowcharting-repository/archives/agenty-flowcharting-panel-0.6.0.zip) - 2019-12-20
### Added
Expand Down
34 changes: 17 additions & 17 deletions dist/img/agenty-flowcharting.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion dist/module.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/partials/inspect_options.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ <h5 class="section-heading">Graph inspect
<table class="table-panel-table">
<thead>
<tr>
<th style="width: 100px;">
<th style="width: 150px;">
<div class="table-panel-table-header-inner pointer">
Id
<info-popover mode="right-normal">
Expand Down
5 changes: 5 additions & 0 deletions src/inspect_options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export class InspectOptionsCtrl {
onChangeId(state: State) {
if (state.newcellId !== undefined && state.cellId !== state.newcellId) {
state.edited = true;
this.flowchartHandler.getFlowchart().getStateHandler().edited = true;
if (state.previousId === undefined) {
state.previousId = state.cellId;
}
Expand All @@ -67,6 +68,8 @@ export class InspectOptionsCtrl {
onEdit(state: State) {
state.edit = true;
state.newcellId = state.cellId;
// let stateHandler = this.flowchartHandler.getFlowchart().getStateHandler();
// stateHandler.edited = true;
const elt = document.getElementById(state.cellId);
setTimeout(() => {
if (elt) {
Expand All @@ -87,8 +90,10 @@ export class InspectOptionsCtrl {
states.forEach(state => {
if (state.edited && state.previousId) {
flowchart.renameId(state.previousId, state.cellId);
state.edited = false;
}
});
this.flowchartHandler.getFlowchart().getStateHandler().edited = false;
flowchart.applyModel();
}

Expand Down
2 changes: 1 addition & 1 deletion src/partials/inspect_options.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ <h5 class="section-heading">Graph inspect
<table class="table-panel-table">
<thead>
<tr>
<th style="width: 100px;">
<th style="width: 150px;">
<div class="table-panel-table-header-inner pointer">
Id
<info-popover mode="right-normal">
Expand Down
1 change: 1 addition & 0 deletions src/statesHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import XGraph from 'graph_class';
export default class StateHandler {
states: Map<string, State>;
xgraph: XGraph;
edited = false;
constructor(xgraph: XGraph) {
GFP.log.info('StateHandler.constructor()');
this.states = new Map();
Expand Down

0 comments on commit fee0569

Please sign in to comment.