Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
scratch-www
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
scratch-www
Commits
f4d0fba0
Commit
f4d0fba0
authored
Oct 23, 2015
by
Matthew Taylor
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #151 from mewtaylor/bugfix/make-arrows-appear
separate out arrows var from settings object
parents
9e9dc022
c6095d64
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
src/components/carousel/carousel.jsx
src/components/carousel/carousel.jsx
+2
-2
No files found.
src/components/carousel/carousel.jsx
View file @
f4d0fba0
...
@@ -23,7 +23,6 @@ var Carousel = React.createClass({
...
@@ -23,7 +23,6 @@ var Carousel = React.createClass({
render
:
function
()
{
render
:
function
()
{
var
settings
=
this
.
props
.
settings
||
{};
var
settings
=
this
.
props
.
settings
||
{};
defaults
(
settings
,
{
defaults
(
settings
,
{
arrows
:
this
.
props
.
items
.
length
>
settings
.
slidesToShow
,
dots
:
false
,
dots
:
false
,
infinite
:
false
,
infinite
:
false
,
lazyLoad
:
true
,
lazyLoad
:
true
,
...
@@ -31,9 +30,10 @@ var Carousel = React.createClass({
...
@@ -31,9 +30,10 @@ var Carousel = React.createClass({
slidesToScroll
:
5
,
slidesToScroll
:
5
,
variableWidth
:
true
variableWidth
:
true
});
});
var
arrows
=
this
.
props
.
items
.
length
>
settings
.
slidesToShow
;
return
(
return
(
<
Slider
className=
{
'
carousel
'
+
this
.
props
.
className
}
{
...
settings
}
>
<
Slider
className=
{
'
carousel
'
+
this
.
props
.
className
}
arrows=
{
arrows
}
{
...
settings
}
>
{
this
.
props
.
items
.
map
(
function
(
item
)
{
{
this
.
props
.
items
.
map
(
function
(
item
)
{
var
href
=
''
;
var
href
=
''
;
switch
(
item
.
type
)
{
switch
(
item
.
type
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment