This commit is contained in:
root
2025-11-13 19:52:28 +03:00
parent 8aeeb05b7d
commit 807dec3b6c
4646 changed files with 163445 additions and 626017 deletions

View File

@@ -1,6 +1,5 @@
<?php
$MESS["JS_UI_VIEWER_DEFAULT_ERROR_TITLE"] = "Қате орын алды";
$MESS["JS_UI_VIEWER_IMAGE_VIEW_FULL_SIZE"] = "Толықтай көрсету";
$MESS["JS_UI_VIEWER_IMAGE_VIEW_FULL_SIZE_MSGVER_1"] = "Түпнұсқаны ашу";
$MESS["JS_UI_VIEWER_ITEM_ACTION_DELETE"] = "Жою";
$MESS["JS_UI_VIEWER_ITEM_ACTION_DOWNLOAD"] = "Жүктеу";

View File

@@ -1234,6 +1234,16 @@
BX.UI.Viewer.Item.prototype.setPropertiesByNode.apply(this, arguments);
this.playerId = `playerId_${this.generateUniqueId()}`;
if (!BX.Type.isUndefined(node.dataset.viewerResized))
{
this.sources = [
{ src: node.dataset.src, type: node.dataset.type },
{ src: node.dataset.src, type: 'video/mp4' },
];
this.width = node.dataset.width;
this.height = node.dataset.height;
}
},
applyReloadOptions(options)
@@ -1249,6 +1259,12 @@
const promise = new BX.Promise();
BX.Runtime.loadExtension('ui.video-player').then(() => {
if (this.sources.length > 0)
{
promise.fulfill(this);
return;
}
const headers = [
{
name: 'BX-Viewer-src',

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,5 +1,4 @@
;(function () {
(function() {
'use strict';
BX.namespace('BX.UI.Viewer');
@@ -56,6 +55,7 @@
this.moreMenu = null;
this.eventsAlreadyBinded = false;
this.pinchZoomHandler = null;
this.init();
};
@@ -657,6 +657,16 @@
{
loadedItem.asFirstToShow();
}
if (this.getCurrentItem() instanceof BX.UI.Viewer.Image)
{
(window.top || window).addEventListener('wheel', this.getPinchZoomHandler(), { passive: false });
}
else
{
(window.top || window).removeEventListener('wheel', this.getPinchZoomHandler(), { passive: false });
this.pinchZoomHandler = null;
}
}
this.processPreload(index, direction);
@@ -687,6 +697,32 @@
this.selectCarouselItem(this.currentIndex, options.asFirstToShow !== true && !cycleMove);
},
getPinchZoomHandler()
{
if (!this.pinchZoomHandler)
{
this.pinchZoomHandler = (event) => {
if (!(event.ctrlKey || event.metaKey))
{
return;
}
event.preventDefault();
if (event.deltaY < 0)
{
this.getCurrentItem().handleZoomIn();
}
else if (event.deltaY > 0)
{
this.getCurrentItem().handleZoomOut();
}
};
}
return this.pinchZoomHandler;
},
processPreload(fromIndex, direction)
{
if (this.maxParallelLoads < 1)
@@ -1836,6 +1872,12 @@
}
}.bind(this));
if (this.pinchZoomHandler)
{
(window.top || window).removeEventListener('wheel', this.getPinchZoomHandler(), { passive: false });
this.pinchZoomHandler = null;
}
// this.items = null;
// this.currentIndex = null;
// this.layout.container = null;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long