mirror of
https://github.com/Fishwaldo/huginn.git
synced 2025-03-15 19:31:26 +00:00
TIL: x ? y
in CoffeeScript is a shorthand for if x? then x else y
.
This commit is contained in:
parent
d22cad0327
commit
1784eeb38a
1 changed files with 1 additions and 1 deletions
|
@ -19,7 +19,7 @@ window.map_marker = (map, options = {}) ->
|
|||
|
||||
if options.course
|
||||
p1 = new LatLon(pos.lat(), pos.lng())
|
||||
speed = if options.speed? then options.speed else 1
|
||||
speed = options.speed ? 1
|
||||
p2 = p1.destinationPoint(options.course, Math.max(0.2, speed) * 0.1)
|
||||
|
||||
lineCoordinates = [
|
||||
|
|
Loading…
Add table
Reference in a new issue