Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When markup is already prepared, flicking saves other elements as children. #438

Closed
sculove opened this issue Jan 14, 2017 · 0 comments
Closed
Assignees
Milestone

Comments

@sculove
Copy link
Contributor

sculove commented Jan 14, 2017

Description

ref #216

The flicking should save panels in eg-flick-container class.
and find eg-flick-container under base element.
now, flicking save all element under base element.
and find only first index.

// _setConfig method
if ($children.eq(0).hasClass(options.prefix + "-container")) {
   this.$container = $children;
   $children = $children.children();
}

this code should change like this.

var $containers = $children.filter("." + options.prefix + "-container");
if ($containers.length) {
	this.$container = $containers.eq(0);
	$children = this.$container.children();
}

Steps to check or reproduce

<div id="mflick">
    <div class="spot_img_box eg-flick-container">
        <div>
            <div class="spot_img" style="background-image: url(./img/department_hyundai.jpg);"></div>
        </div>
        <div>
            <div class="spot_img" style="background-image: url(./img/department_lotte.jpg);"></div>
        </div>
        <div>
            <div class="spot_img" style="background-image: url(./img/department_ak.jpg);"></div>
        </div>
    </div>
    <div class="spot_item_box">
        <div class="spot_item selected _1">
            <a href="#" class="lnk_branch">
                <span class="ico_arr"></span>
                <span class="en">HYUNDAI0</span>
            </a>
        </div>
        <div class="spot_item _2">
            <a href="#" class="lnk_branch">
                <span class="ico_arr"></span>
                <span class="en">LOTTE1</span>
            </a>
        </div>
        <div class="spot_item _3">
            <a href="#" class="lnk_branch">
                <span class="ico_arr"></span>
                <span class="en">AK PLAZA2</span>
            </a>
        </div>
        <div class="spot_item _4">
            <a href="#" class="lnk_branch">
                <span class="ico_arr"></span>
                <span class="en">LOTTE9</span>
            </a>
        </div>
    </div>
    <div class="spot_navi_bar">
    </div>
    <div class="spot_cont_box">
        <div class="item_source selected">
        </div>
        <div class="item_source">
        </div>
        <div class="item_source">
        </div>        
    </div>
</div>
new eg.Flicking("#mflick")
@netil netil added this to the 1.5.0 milestone Jan 16, 2017
@netil netil self-assigned this Jan 16, 2017
netil added a commit to netil/egjs that referenced this issue Feb 20, 2017
When container element is given,
corrected referencing panel elements properly.

Ref naver#438
@netil netil closed this as completed in db6945a Mar 3, 2017
netil added a commit to netil/egjs that referenced this issue Mar 21, 2017
When container element is given,
corrected referencing panel elements properly.

Ref naver#438
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants