Skip to content

Commit

Permalink
Fix: exit current editing mode of active poly before enter a new one
Browse files Browse the repository at this point in the history
  • Loading branch information
alessandrobattisti committed Aug 25, 2018
1 parent 0bb9331 commit 66adf64
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 12 deletions.
4 changes: 2 additions & 2 deletions build/asset-manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"main.css": "static/css/main.1f97f8c6.css",
"main.css.map": "static/css/main.1f97f8c6.css.map",
"main.js": "static/js/main.b7eb699e.js",
"main.js.map": "static/js/main.b7eb699e.js.map"
"main.js": "static/js/main.16a3ac7a.js",
"main.js.map": "static/js/main.16a3ac7a.js.map"
}
2 changes: 1 addition & 1 deletion build/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name="theme-color" content="#000000"><link rel="manifest" href="./manifest.json"><link rel="shortcut icon" href="./favicon.ico"><title>Vessel measuring tool</title><link href="./static/css/main.1f97f8c6.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script type="text/javascript" src="./static/js/main.b7eb699e.js"></script></body></html>
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name="theme-color" content="#000000"><link rel="manifest" href="./manifest.json"><link rel="shortcut icon" href="./favicon.ico"><title>Vessel measuring tool</title><link href="./static/css/main.1f97f8c6.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script type="text/javascript" src="./static/js/main.16a3ac7a.js"></script></body></html>

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions build/static/js/main.16a3ac7a.js.map

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion build/static/js/main.b7eb699e.js.map

This file was deleted.

4 changes: 2 additions & 2 deletions docs/asset-manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"main.css": "static/css/main.1f97f8c6.css",
"main.css.map": "static/css/main.1f97f8c6.css.map",
"main.js": "static/js/main.b7eb699e.js",
"main.js.map": "static/js/main.b7eb699e.js.map"
"main.js": "static/js/main.16a3ac7a.js",
"main.js.map": "static/js/main.16a3ac7a.js.map"
}
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name="theme-color" content="#000000"><link rel="manifest" href="/Vessel-Measuring-Tool/manifest.json"><link rel="shortcut icon" href="/Vessel-Measuring-Tool/favicon.ico"><title>Vessel measuring tool</title><link href="/Vessel-Measuring-Tool/static/css/main.1f97f8c6.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script type="text/javascript" src="/Vessel-Measuring-Tool/static/js/main.b7eb699e.js"></script></body></html>
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name="theme-color" content="#000000"><link rel="manifest" href="/Vessel-Measuring-Tool/manifest.json"><link rel="shortcut icon" href="/Vessel-Measuring-Tool/favicon.ico"><title>Vessel measuring tool</title><link href="/Vessel-Measuring-Tool/static/css/main.1f97f8c6.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script type="text/javascript" src="/Vessel-Measuring-Tool/static/js/main.16a3ac7a.js"></script></body></html>

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/static/js/main.16a3ac7a.js.map

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion docs/static/js/main.b7eb699e.js.map

This file was deleted.

7 changes: 7 additions & 0 deletions src/Draw.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,13 @@ class Draw extends Component {
poly.el.classList.remove('active')
})
if(this.state.active_polyline){
//exit all possible editing states of active polyline
if(this.state.active_polyline.editing){
this.state.active_polyline.stopEditingPoints({code:'Escape'})
}
if(this.state.active_polyline.breaking_mode){
this.exitBreakLineMode({code:'Escape'})
}
this.state.active_polyline.stopEditing({'code':'Escape'})
}
}
Expand Down

0 comments on commit 66adf64

Please sign in to comment.