<p dir="auto">Directions page javascript controller has two route endpoint objects. They manage from/to inputs and markers. When inputs and markers are updated, endpoint objects call <code class="notranslate">getRoute</code> method of the controller to redraw the route. But why should endpoints know anything about the entire route? They only need to report that an input or a marker was updated and let the outside code decide what to do in response.</p>
<hr>
<h4>You can view, comment on, or merge this pull request online at:</h4>
<p> <a href='https://github.com/openstreetmap/openstreetmap-website/pull/4902'>https://github.com/openstreetmap/openstreetmap-website/pull/4902</a></p>
<h4>Commit Summary</h4>
<ul>
<li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/4902/commits/d3ab0c9a8a01161a5f701e3fafbc16d08716dd40" class="commit-link">d3ab0c9</a> Introduce drag event callback for route endpoints</li>
<li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/4902/commits/ac1b1f3e11ed814a83e8fbdc6c94892ee83a5654" class="commit-link">ac1b1f3</a> Introduce geocode event callback for route endpoints</li>
</ul>
<h4 style="display: inline-block">File Changes </h4> <p style="display: inline-block">(<a href="https://github.com/openstreetmap/openstreetmap-website/pull/4902/files">1 file</a>)</p>
<ul>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/4902/files#diff-fdb9558c2ba79ddf9fbcb92594a8a8fa54abb1b3e25ce264de37951b428a958b">app/assets/javascripts/index/directions.js</a>
(21)
</li>
</ul>
<h4>Patch Links:</h4>
<ul>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/4902.patch'>https://github.com/openstreetmap/openstreetmap-website/pull/4902.patch</a></li>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/4902.diff'>https://github.com/openstreetmap/openstreetmap-website/pull/4902.diff</a></li>
</ul>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/4902">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLOXNBZUJIO3UJCGYBLZHSINDAVCNFSM6AAAAABJL5SACSVHI2DSMVQWIX3LMV43ASLTON2WKOZSGM2TKMJWGEYTSNI">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLOUYH6DMAQ2OV6OZPDZHSINDA5CNFSM6AAAAABJL5SACSWGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHIYYHINM.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/openstreetmap-website/pull/4902</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/4902",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/4902",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>