-
Notifications
You must be signed in to change notification settings - Fork 441
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(Screen): allow to zoom and pan screenshare content #14028
Open
Antreesy
wants to merge
4
commits into
fix/12187/presenter-overlay-borders
Choose a base branch
from
feat/12187/zoom-in-screenshare
base: fix/12187/presenter-overlay-borders
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+129
−6
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
5488656
fix(PresenterOverlay): limit overlay to video_promoted wrapper borders
Antreesy 9c95b70
fix(PresenterOverlay): fix relative positioning
Antreesy 2e25edc
chore(deps): install panzoom library v9.4.3
Antreesy 107c559
feat(Screen): allow to zoom and pan screenshare content
Antreesy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,8 @@ | |
<script> | ||
import Hex from 'crypto-js/enc-hex.js' | ||
import SHA1 from 'crypto-js/sha1.js' | ||
import panzoom from 'panzoom' | ||
import { ref, onMounted, onBeforeUnmount } from 'vue' | ||
|
||
import { t } from '@nextcloud/l10n' | ||
|
||
|
@@ -64,7 +66,27 @@ export default { | |
|
||
setup() { | ||
const guestNameStore = useGuestNameStore() | ||
return { guestNameStore } | ||
|
||
const screen = ref(null) | ||
const screenPanzoomInstance = ref(null) | ||
|
||
onMounted(() => { | ||
screenPanzoomInstance.value = panzoom(screen.value, { | ||
minZoom: 1, | ||
maxZoom: 8, | ||
bounds: true, | ||
boundsPadding: 1, | ||
}) | ||
}) | ||
onBeforeUnmount(() => { | ||
screenPanzoomInstance.value?.dispose() | ||
}) | ||
|
||
return { | ||
guestNameStore, | ||
screen, | ||
screenPanzoomInstance, | ||
} | ||
}, | ||
|
||
computed: { | ||
|
@@ -111,11 +133,10 @@ export default { | |
return remoteParticipantName | ||
}, | ||
screenClass() { | ||
if (this.isBig) { | ||
return 'screen--fit' | ||
} else { | ||
return 'screen--fill' | ||
} | ||
return [ | ||
this.isBig ? 'screen--fit' : 'screen--fill', | ||
this.screenPanzoomInstance ? 'screen--magnify' : '', | ||
] | ||
}, | ||
|
||
}, | ||
|
@@ -165,6 +186,11 @@ export default { | |
|
||
<style lang="scss" scoped> | ||
|
||
.screenContainer { | ||
width: 100%; | ||
height: 100%; | ||
} | ||
|
||
.screen { | ||
width: 100%; | ||
height: 100%; | ||
|
@@ -177,6 +203,9 @@ export default { | |
&--fill { | ||
object-fit: cover; | ||
} | ||
&--magnify { | ||
cursor: zoom-in; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
} | ||
} | ||
|
||
</style> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In which case
screenPanzoomInstance.value
is null/undefined?