76 Commits

Author SHA1 Message Date
Oscar Lorentzon
f755de1ea8 Document slider component. 2016-03-06 13:34:03 +01:00
Oscar Lorentzon
e5b5e83d35 Initial position configuration option for slider.
Add initial position property to slider configuration.
Handle initial position when activated.
API method for setting initial position.
2016-03-06 13:12:42 +01:00
Oscar Lorentzon
e07ae1d7ac Do not render background plane when slider disabled.
Do not render background plane to avoid it being displayed
beside non filling foreground images.
2016-03-06 13:12:42 +01:00
Oscar Lorentzon
dea081c14a Clear key configuration on deactivation.
Start configuration subscription after setting up
other subscriptions.
2016-03-06 13:12:42 +01:00
Oscar Lorentzon
c21cff0095 Export slider keys interface. 2016-03-06 13:12:41 +01:00
Oscar Lorentzon
daeb7cf5d0 Use configuration to set slider keys.
Use configuration to be able to initialize viewer
with slider keys.
2016-03-06 13:12:41 +01:00
Oscar Lorentzon
b15f351fd1 Prevent default for key arrow events.
Prevent default for key arrow events to avoid scrolling
in browser when moving.
2016-03-03 22:53:52 +01:00
Oscar Lorentzon
d6da463161 Check if direction exist before moving.
Avoid errors in keyboard component by checking edges.
2016-03-03 22:43:25 +01:00
Oscar Lorentzon
c9a47a49ba Log navigation errors in keyboard component.
Fixes #76
2016-03-03 22:27:53 +01:00
Oscar Lorentzon
e053546f1f Revert player stop behavior.
The special stop without cut is needed when
reaching the end of a sequence to avoid stopping
before the last node.
2016-03-03 17:23:24 +01:00
Oscar Lorentzon
210bc73c7c Remove context property and expose state type as observable.
Use state observable in slider component.
2016-03-03 15:47:47 +01:00
Oscar Lorentzon
92cc09626f Disable slider if when nodes are not set. 2016-03-02 17:59:12 +01:00
Oscar Lorentzon
405cfae423 Use alpha as truth for slider curtain value.
Avoid setting the curtain value in two places.
Set it only on state and use the returned value
to set the curtain in the slider state.
2016-03-02 17:44:43 +01:00
Oscar Lorentzon
2287cc64fb Disable slider for motionless transitions.
Do not move state when slider is disabled.
2016-03-02 17:20:02 +01:00
Oscar Lorentzon
74e168e75b Disable slider functionality for pano nodes. 2016-03-02 15:55:56 +01:00
Oscar Lorentzon
ff821f1c6c Empty image plane scene arrays on clear. 2016-03-02 15:52:08 +01:00
Oscar Lorentzon
d2eef90aed Dispose slider state in stream on component deactivation.
Ensure that slider state has a subscription before
calling onNext on slider creator.
2016-03-02 15:11:39 +01:00
Oscar Lorentzon
28ef13fddd Check state in slider component before changing. 2016-03-02 14:36:37 +01:00
Oscar Lorentzon
cfd8d1b632 Update slider curtain on mouse move.
Always render on a mouse move.
Move state camera position along with curtain.
2016-03-02 14:01:57 +01:00
Oscar Lorentzon
7fd72d0fc8 Slider class to hold state in obervable stream.
Use scan operator to handle slider state updates.
2016-03-02 10:54:49 +01:00
Oscar Lorentzon
1e0b60143f Set state to waiting when activating slider.
Set it back to traversing when deactivating slider.
2016-03-02 08:53:44 +01:00
Oscar Lorentzon
9e14eea85b Set nodes API on slider component.
API for setting nodes from keys on slider component.
Use set image planes methods on scene to always
overwrite old planes.
2016-03-02 08:33:15 +01:00
Oscar Lorentzon
0ee9a2ad85 Reset image plane functionalty in scene. 2016-03-02 08:28:12 +01:00
Oscar Lorentzon
28d885a63f Show image planes in slider component.
Render image planes with opacity of one always.
2016-03-01 18:04:21 +01:00
Oscar Lorentzon
c790599e9f Move image plane creation logic to separate class.
Use factory in image plane component.
2016-03-01 17:12:17 +01:00
Oscar Lorentzon
97c9f9209b Add empty slider component.
Disabled by default.
2016-03-01 16:47:49 +01:00
Oscar Lorentzon
521550b15a Bounding box crop in perspective shader.
Crop to image boundaries in image plane component.
2016-03-01 16:37:36 +01:00
Oscar Lorentzon
726e0b72a2 Install manually created typings.
Create a single source of typings by installing
manually created typings with file: prefix.
2016-02-29 17:22:42 +01:00
Oscar Lorentzon
8066b9c52a Use Typings instead of TSD.
Remove deprecated TSD dependency.
Use Typings to install type definitions.
Install rx typings from npm package.
2016-02-29 16:58:56 +01:00
Oscar Lorentzon
7d1a3c9294 Fix TSLint issues. 2016-02-29 11:45:58 +01:00
Oscar Lorentzon
692af13de3 Move sequence arrows to its own component.
Sequence component is active by default.
2016-02-25 15:41:51 +01:00
Oscar Lorentzon
9e4f5d7d10 Minimum rotation of 90 degrees when dragging.
Ensure dragging over whole viewer gives at least a 90 degree
rotation.
2016-02-19 10:14:54 +01:00
Oscar Lorentzon
ae291f4f8d Lower opacity for disabled pano to perspective arrows.
Indicate that those arrows are disabled correctly.
2016-02-19 09:34:32 +01:00
Oscar Lorentzon
3fbd95cb67 Pascal case for GL render stage enum. 2016-02-19 08:54:24 +01:00
Oscar Lorentzon
8371c1b785 Use polyfilled movement properties and increase max rotation.
Fixes #66

Increase max rotation to rotate 135 degrees on full viewer drag.
Use mouse drag observable directly to get momentum when
releasing mouse.
2016-02-16 16:55:30 +01:00
Johan Gyllenspetz
c208cce734 Add activaterd as a stream from every component 2016-02-12 14:35:27 -08:00
Johan Gyllenspetz
6cd3facd02 Save markers as a spatial index instead of an array, to allow 1000s of markers 2016-02-10 11:55:34 -08:00
Johan Gyllenspetz
3f6c59c3e5 Convert Marker UI to a Component 2016-02-10 11:28:54 -08:00
Johan Gyllenspetz
f8d2921fd4 Add Play and Stop support to RouteComponent 2016-02-09 22:33:07 -08:00
Johan Gyllenspetz
b27de56cce Initial version of RouteComponent 2016-02-09 17:36:44 -08:00
Kamil Nikel
b96f613a57 Add initial BackgroundComponent 2016-02-09 17:47:07 +01:00
Kamil Nikel
40adf7453c Add initial RouteComponent 2016-02-09 17:30:30 +01:00
Kamil Nikel
b6677a6b17 Use node.textContent instead of node.innerText in vdom nodes 2016-02-09 11:44:15 +01:00
Kamil Nikel
c5bb8333c0 Update movementX/Y with mouseDragEnd$ values
This prevents the panorama from _jumping_ when the subsequent drags are
far apart from one another. This is achieved though merging the
mouseDragEnd$ and guarding for non-existent screenX/Y properties on events.
2016-02-09 11:29:53 +01:00
Kamil Nikel
4a593cfca8 Use screenX/Y for calculating movements
Fixes unexepected panorama drag behavior in Safari, due to lack of e.movementX/Y API
2016-02-09 10:39:15 +01:00
Johan Gyllenspetz
40bead4935 Update PlayerComponent to not depend on null but on correct throw for stop 2016-02-08 21:14:43 -08:00
Kamil Nikel
20ca0b987d Rename enumerations with PascalCase
Fixes mapillar/mapillary-js#61
2016-02-08 12:12:01 +01:00
Oscar Lorentzon
a41b45fa20 Set arrow opacity dynamically based on camera direction.
Lower opacity linearly when looking over horizon.
Override when hover in css.
2016-02-05 17:18:42 +01:00
Oscar Lorentzon
a0dd4364ee Distinct before next node to ensure a single call.
Ensure that async call to next node is only performed
once by doing distinct on last node in
trajectory before call. Use state properties instead
of calculating last and nodes ahead.
2016-02-05 15:31:36 +01:00
Oscar Lorentzon
7c7feb1e01 Always dispose playing subscription when deactivated. 2016-02-05 11:52:32 +01:00