mirror of
https://github.com/zadam/trilium.git
synced 2025-11-11 15:55:52 +01:00
drop support for ie 8
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
// The programming goals of Split.js are to deliver readable, understandable and
|
// The programming goals of Split.js are to deliver readable, understandable and
|
||||||
// maintainable code, while at the same time manually optimizing for tiny minified file size,
|
// maintainable code, while at the same time manually optimizing for tiny minified file size,
|
||||||
// browser compatibility without additional requirements, graceful fallback (IE8 is supported)
|
// browser compatibility without additional requirements
|
||||||
// and very few assumptions about the user's page layout.
|
// and very few assumptions about the user's page layout.
|
||||||
const global = window
|
const global = window
|
||||||
const { document } = global
|
const { document } = global
|
||||||
@@ -16,10 +16,6 @@ const bGutterSize = '_c'
|
|||||||
const HORIZONTAL = 'horizontal'
|
const HORIZONTAL = 'horizontal'
|
||||||
const NOOP = () => false
|
const NOOP = () => false
|
||||||
|
|
||||||
// Figure out if we're in IE8 or not. IE8 will still render correctly,
|
|
||||||
// but will be static instead of draggable.
|
|
||||||
const isIE8 = global.attachEvent && !global[addEventListener]
|
|
||||||
|
|
||||||
// Helper function determines which prefixes of CSS calc we need.
|
// Helper function determines which prefixes of CSS calc we need.
|
||||||
// We only need to do this once on startup, when this anonymous function is called.
|
// We only need to do this once on startup, when this anonymous function is called.
|
||||||
//
|
//
|
||||||
@@ -92,11 +88,7 @@ const defaultElementStyleFn = (dim, size, gutSize) => {
|
|||||||
const style = {}
|
const style = {}
|
||||||
|
|
||||||
if (!isString(size)) {
|
if (!isString(size)) {
|
||||||
if (!isIE8) {
|
|
||||||
style[dim] = `${calc}(${size}% - ${gutSize}px)`
|
style[dim] = `${calc}(${size}% - ${gutSize}px)`
|
||||||
} else {
|
|
||||||
style[dim] = `${size}%`
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
style[dim] = size
|
style[dim] = size
|
||||||
}
|
}
|
||||||
@@ -623,8 +615,6 @@ const Split = (idsOption, options = {}) => {
|
|||||||
// staticly assigning sizes without draggable gutters. Assigns a string
|
// staticly assigning sizes without draggable gutters. Assigns a string
|
||||||
// to `size`.
|
// to `size`.
|
||||||
//
|
//
|
||||||
// IE9 and above
|
|
||||||
if (!isIE8) {
|
|
||||||
// Create gutter elements for each pair.
|
// Create gutter elements for each pair.
|
||||||
if (i > 0) {
|
if (i > 0) {
|
||||||
const gutterElement = gutter(i, direction, element.element)
|
const gutterElement = gutter(i, direction, element.element)
|
||||||
@@ -647,7 +637,6 @@ const Split = (idsOption, options = {}) => {
|
|||||||
|
|
||||||
pair.gutter = gutterElement
|
pair.gutter = gutterElement
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
setElementSize(
|
setElementSize(
|
||||||
element.element,
|
element.element,
|
||||||
@@ -744,13 +733,6 @@ const Split = (idsOption, options = {}) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isIE8) {
|
|
||||||
return {
|
|
||||||
setSizes,
|
|
||||||
destroy,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
setSizes,
|
setSizes,
|
||||||
getSizes,
|
getSizes,
|
||||||
|
|||||||
Reference in New Issue
Block a user