OHIF-323: Cine Dialog (#1961)

* ohif-323: add cineplayer flow

* ohif-323: improve toolbar flow of cine

* ohif-323: improve cine styles

* ohif-323: use toggle instead of set

* ohif-323: add compatibility comment

* ohif-323: move cine logic to command

* ohif-323: cr update

* ohif-323: remove typo and update svg title

* ohif-323: remove log

* ohif-323: update props and remove dead code

Co-authored-by: Danny Brown <danny.ri.brown@gmail.com>
This commit is contained in:
Igor OctavianoandDanny Brown authored and GitHub committed 2020-08-19 15:24:07 -04:00
1 parent 3e944780dc
commit 760e2a62ae
31 files changed
+575 -70

No files matched your search

@@ -0,0 +1,52 @@
const name = 'CineService';
const publicAPI = {
name,
getState: _getState,
setCine: _setCine,
setIsCineEnabled: _setIsCineEnabled,
setServiceImplementation,
};
const serviceImplementation = {
_getState: () => console.warn('getState() NOT IMPLEMENTED'),
_setCine: () =>
console.warn('setCine() NOT IMPLEMENTED'),
_setIsCineEnabled: () =>
console.warn('setIsCineEnabled() NOT IMPLEMENTED'),
};
function _getState() {
return serviceImplementation._getState();
}
function _setCine({ id, frameRate, isPlaying }) {
return serviceImplementation._setCine({ id, frameRate, isPlaying });
}
function _setIsCineEnabled(isCineEnabled) {
return serviceImplementation._setIsCineEnabled(isCineEnabled);
}
function setServiceImplementation({
getState: getStateImplementation,
setCine: setCineImplementation,
setIsCineEnabled: setIsCineEnabledImplementation,
}) {
if (getStateImplementation) {
serviceImplementation._getState = getStateImplementation;
}
if (setCineImplementation) {
serviceImplementation._setCine = setCineImplementation;
}
if (setIsCineEnabledImplementation) {
serviceImplementation._setIsCineEnabled = setIsCineEnabledImplementation;
}
}
export default {
name,
create: ({ configuration = {} }) => {
return publicAPI;
},
};
@@ -0,0 +1,2 @@
import CineService from './CineService';
export default CineService;