mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 18:36:30 +01:00 
			
		
		
		
	ignore minSize if parent is too small
This commit is contained in:
		| @@ -62,7 +62,7 @@ var Split = require('split.js') | |||||||
| The [UMD](https://github.com/umdjs/umd) build is also available on [unpkg](http://unpkg.com/): | The [UMD](https://github.com/umdjs/umd) build is also available on [unpkg](http://unpkg.com/): | ||||||
|  |  | ||||||
| ```html | ```html | ||||||
| <script src="https://unpkg.com/split.js/split.min.js"></script> | <script src="https://unpkg.com/split.js/dist/split.min.js"></script> | ||||||
| ``` | ``` | ||||||
|  |  | ||||||
| You can find the library on `window.Split`. | You can find the library on `window.Split`. | ||||||
|   | |||||||
| @@ -381,6 +381,10 @@ const Split = (idsOption, options = {}) => { | |||||||
|             return sizesToTrim |             return sizesToTrim | ||||||
|         } |         } | ||||||
|  |  | ||||||
|  |         if (minSizes.reduce((a, b) => a + b, 0) > parentSize) { | ||||||
|  |             return sizesToTrim | ||||||
|  |         } | ||||||
|  |  | ||||||
|         // Keep track of the excess pixels, the amount of pixels over the desired percentage |         // Keep track of the excess pixels, the amount of pixels over the desired percentage | ||||||
|         // Also keep track of the elements with pixels to spare, to decrease after if needed |         // Also keep track of the elements with pixels to spare, to decrease after if needed | ||||||
|         let excessPixels = 0 |         let excessPixels = 0 | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user