mirror of
				https://github.com/SillyTavern/SillyTavern.git
				synced 2025-06-05 21:59:27 +02:00 
			
		
		
		
	Adjust VN mode width overlap calculations
This commit is contained in:
		| @@ -192,8 +192,10 @@ async function visualNovelUpdateLayers(container) { | |||||||
|     let currentPosition = pivotalPoint - (totalWidth / 2); |     let currentPosition = pivotalPoint - (totalWidth / 2); | ||||||
|  |  | ||||||
|     if (totalWidth > containerWidth) { |     if (totalWidth > containerWidth) { | ||||||
|         let overlap = (totalWidth - containerWidth) / (imagesWidth.length - 1); |         let totalOverlap = totalWidth - containerWidth; | ||||||
|         imagesWidth = imagesWidth.map((width) => width - overlap); |         let totalWidthWithoutWidest = imagesWidth.reduce((a, b) => a + b, 0) - Math.max(...imagesWidth); | ||||||
|  |         let overlaps = imagesWidth.map(width => (width / totalWidthWithoutWidest) * totalOverlap); | ||||||
|  |         imagesWidth = imagesWidth.map((width, index) => width - overlaps[index]); | ||||||
|         currentPosition = 0; // Reset the initial position to 0 |         currentPosition = 0; // Reset the initial position to 0 | ||||||
|     } |     } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -15,6 +15,7 @@ | |||||||
|     height: calc(100vh - 40px); |     height: calc(100vh - 40px); | ||||||
|     width: 100vw; |     width: 100vw; | ||||||
|     position: relative; |     position: relative; | ||||||
|  |     overflow: hidden; | ||||||
| } | } | ||||||
|  |  | ||||||
| #visual-novel-wrapper  .expression-holder { | #visual-novel-wrapper  .expression-holder { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user