Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
Quick Tiled View
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Yuya Nishihara
Quick Tiled View
Commits
c49c874b
Commit
c49c874b
authored
3 years ago
by
Yuya Nishihara
Browse files
Options
Downloads
Patches
Plain Diff
make sure to reset positions array on split count changed
parent
2bf4bcb6
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
TileView.qml
+20
-11
20 additions, 11 deletions
TileView.qml
with
20 additions
and
11 deletions
TileView.qml
+
20
−
11
View file @
c49c874b
...
...
@@ -12,15 +12,13 @@ Control {
property
real
handleWidth
:
5
property
real
handleHeight
:
5
property
var
_majorPositions
:
{
let
positions
=
[];
for
(
let
i
=
0
;
i
<
majorCount
;
++
i
)
{
positions
.
push
(
i
/
majorCount
);
}
return
positions
;
}
property
var
_minorPositions
:
{
let
count
=
Math
.
max
(...
minorCounts
);
property
var
_majorPositions
:
_makeDefaultPositionsArray
(
majorCount
)
property
var
_minorPositions
:
_makeDefaultPositionsArray
(
Math
.
max
(...
minorCounts
))
property
alias
model
:
contentRepeater
.
model
property
Component
delegate
function
_makeDefaultPositionsArray
(
count
)
{
let
positions
=
[];
for
(
let
i
=
0
;
i
<
count
;
++
i
)
{
positions
.
push
(
i
/
count
);
...
...
@@ -28,8 +26,19 @@ Control {
return
positions
;
}
property
alias
model
:
contentRepeater
.
model
property
Component
delegate
Component.onCompleted
:
{
// break binding
_majorPositions
=
_majorPositions
;
_minorPositions
=
_minorPositions
;
}
onMajorCountChanged
:
{
_majorPositions
=
_makeDefaultPositionsArray
(
majorCount
);
}
onMinorCountsChanged
:
{
_minorPositions
=
_makeDefaultPositionsArray
(
Math
.
max
(...
minorCounts
));
}
contentItem
:
Item
{
Item
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment