mirror of
https://github.com/FoggedLens/iD.git
synced 2026-03-30 17:00:35 +02:00
Fix photoviewer resize event
This commit is contained in:
@@ -372,7 +372,7 @@ export default {
|
||||
defs.call(svgDefs(context).addSprites, ['mapillary-sprite']);
|
||||
|
||||
// Register viewer resize handler
|
||||
context.ui().on('photoviewerResize', function() {
|
||||
context.ui().photoviewer.on('resize', function() {
|
||||
if (_mlyViewer) {
|
||||
_mlyViewer.resize();
|
||||
}
|
||||
|
||||
@@ -327,7 +327,7 @@ export default {
|
||||
|
||||
|
||||
// Register viewer resize handler
|
||||
context.ui().on('photoviewerResize', function(dimensions) {
|
||||
context.ui().photoviewer.on('resize', function(dimensions) {
|
||||
imgZoom = d3_zoom()
|
||||
.extent([[0, 0], dimensions])
|
||||
.translateExtent([[0, 0], dimensions])
|
||||
|
||||
@@ -626,7 +626,7 @@ export default {
|
||||
|
||||
|
||||
// Register viewer resize handler
|
||||
context.ui().on('photoviewerResize', function() {
|
||||
context.ui().photoviewer.on('resize', function() {
|
||||
if (_pannellumViewer) {
|
||||
_pannellumViewer.resize();
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ import { services } from '../services';
|
||||
|
||||
export function uiPhotoviewer(context) {
|
||||
|
||||
var dispatch = d3_dispatch('photoviewerResize');
|
||||
var dispatch = d3_dispatch('resize');
|
||||
|
||||
function photoviewer(selection) {
|
||||
selection
|
||||
@@ -30,7 +30,7 @@ export function uiPhotoviewer(context) {
|
||||
.attr('class', 'resize-handle-xy')
|
||||
.on(
|
||||
'mousedown',
|
||||
buildResizeListener(selection, 'photoviewerResize', dispatch, { resizeOnX: true, resizeOnY: true })
|
||||
buildResizeListener(selection, 'resize', dispatch, { resizeOnX: true, resizeOnY: true })
|
||||
);
|
||||
|
||||
selection
|
||||
@@ -38,7 +38,7 @@ export function uiPhotoviewer(context) {
|
||||
.attr('class', 'resize-handle-x')
|
||||
.on(
|
||||
'mousedown',
|
||||
buildResizeListener(selection, 'photoviewerResize', dispatch, { resizeOnX: true })
|
||||
buildResizeListener(selection, 'resize', dispatch, { resizeOnX: true })
|
||||
);
|
||||
|
||||
selection
|
||||
@@ -46,7 +46,7 @@ export function uiPhotoviewer(context) {
|
||||
.attr('class', 'resize-handle-y')
|
||||
.on(
|
||||
'mousedown',
|
||||
buildResizeListener(selection, 'photoviewerResize', dispatch, { resizeOnY: true })
|
||||
buildResizeListener(selection, 'resize', dispatch, { resizeOnY: true })
|
||||
);
|
||||
|
||||
|
||||
@@ -117,7 +117,7 @@ export function uiPhotoviewer(context) {
|
||||
.style('width', setPhotoDimensions[0] + 'px')
|
||||
.style('height', setPhotoDimensions[1] + 'px');
|
||||
|
||||
dispatch.call('photoviewerResize', photoviewer, setPhotoDimensions);
|
||||
dispatch.call('resize', photoviewer, setPhotoDimensions);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user