Comments (12)
After switching to getBoundingClientRect()
and getting exact widths as floats, the issue is still there. So it must be something else.
from split.
I have never seen the right edge creep right, only left.
from split.
Yes, should have phrased that better. That's correct.
from split.
I activated the Firefox Developer Tools Inspector and looked at the widths of the panes in the three-pane example.
Before dragging any gutters, the widths were, from left to right, 33.3333%-5px 33.3333%-10px 33.3333%-5px -- all good.
After dragging the leftmost gutter slightly left, the widths were 30.4802%-5px 32.4635%-10px 33.3333%-5px.
Thus, the sum of the widths of the left and center panes, before allowing for gutters, went from 66.6666% to 62.9437%.
I still don't see why, though.
from split.
Is it the scrollbars? Does clientWidth include the scrollbars? If it does not, ...
from split.
Ah! Wasn't counting the half gutters on each side of the pair. Check out feb2e68, it gets it a lot closer. Still moves a bit.
from split.
clientWidth of the parent is 958. clientWidths of the three panes are -- in the three-pane example, before any gutter-dragging -- 299 294 299 which sum to 892. The two gutters total 20, bringing the total to 912.
The missing amount is 46 pixels. If it's the scrollbars, divide by three and get 15 pixels each, with one pixel left over. Doesn't quite look right -- the scrollbars don't look 50% larger than the gutters -- but where else would the missing pixels be hiding?
I think the calculation of this.percentage should not use parent.clientWidth in the denominator: using it makes the denominator too big.
from split.
The scroll bars are definitely counted. But you're right, there's a pixel missing (1.333px by my count after the last commits).
from split.
It might be a difference between CSS calc()
and the math in the script. calc(33.333% - 5px)
is 314.333 according to the browser. If I do the math, I get 314.68. Going to read up on how calc()
works.
from split.
If you try the latest version I think I solved it. The script was counting the parent borders, while CSS calc()
was not. 2 pixels off was enough to make the side creep left.
from split.
I think you've got it! Thanks!
from split.
Thank you for help debugging it!
from split.
Related Issues (20)
- How to update properties without destroying and reinitialization? HOT 1
- showing error: requested module does not provide an export named 'Split'
- React split - add support for dynamically added panes
- the div nestes in gutter can't response to onclick?
- [Split-Grid] Gutters should be used in a two-dimensional way.
- Multiple track registration constructor vs add api (split-grid) HOT 1
- [split-grid] columnMaxSize(s) not working HOT 2
- [Split-Grid]: typo in typescript types HOT 4
- [React Split Grid] Example from docu doesn't work for me HOT 2
- Is there a way to make Split work without gaps/gutters?
- Split.js: drag is not stopped before destroy
- Style : gutter cursor style when hover HOT 2
- Intervention : IgnoredEventCancel
- Server Error HOT 2
- Fetaure request: Allow individual min/max sizing of elements
- Error: 'Split' cannot be used as a JSX component - TS2786
- TypeError: Object prototype may only be an Object or null: undefined HOT 4
- [Split-Grid] `fr` explosion HOT 1
- MinSize ignored if Split created on invisible DOM Elements HOT 1
- Resize of row/column is not working when Split() is included directly in html (instead of separate script) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from split.