Code Monkey home page Code Monkey logo

angular-slimscroll's People

Contributors

gabrielfgularte avatar gregwym avatar huguangju avatar kkoscielniak avatar mikhaelgerbet avatar myomyintaung512 avatar ziscloud avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

angular-slimscroll's Issues

Refresh/Update doesn't seem to be fully working.

I have the scrollbar implemented on the initial view/state of my project which is using ui.router. What's getting rendered is a json data list from our API in a blog style format, and with ng-repeat. The scrollbar gets applied correctly and since we're using height:auto for responsiveness, everything works fine initially.

However when I click a button and go to a different view/state, and then come back to that same view/state, nothing is shown. Further looking into the DOM inspector, I find that height:auto is getting ignored and the height = 0. The content is there, but it's appearing to be "hidden" because of the scroll-body div being set to height:0.

I'm wondering if the scrollbar directive is getting executed before the div is getting re-rendered with the json data. Although this wouldn't make sense because everything is fine on the initial view. Its just that when you leave it to view another view/state, and then come back to it, it's not refreshed/updated correctly. Any clues as to why this is happening, or what can be done to do a force refresh/update while using height:auto?

Thanks

Update scrollbar after pushing elements

Hi, I'm pushing children into the container having a slimscroll toolbar and would like to do a scrollTo: $bottom afterwards in my controller, like so:

$scope.mycontent.push(newelem);
// update myscrollwindow to scroll to bottom:
var scrollDiv = jQuery('#mycontainer');
var scrollToVal = scrollDiv.prop('scrollHeight') + 'px';
scrollDiv.slimScroll({ scrollTo : scrollToVal });

This obviously doesn't work as the height is not yet updated because the dom is not re-rendered at that point. Any idea how I would update slimscroll right after pushing elements?

double scrollbar added

Hey man,

I noticed there are two scrollbars being initiated.
I am using the scrollbar inside a div with an ng-if directive

Any ideas what might be going wrong?

slimScroll() is not a function

Console says that slimScroll is undefined. I figured out that slimScroll() only work on jQuery objects, so I'm writing a fix for this. Anyways, good job here! Cheers!

Inner scroll not working

Hello I have used slim scroll and in that one I have used simple HTML scroll in small div, but when I am scrolling div that time only scroll slim scroll. Inner scroll not working so what can I do?

Thank you.

Hide scrollbar when it isn't need

Is there any way to hide only the scroll bar (not disable) when it isn't need? E.g. a dynamic list whose the items are not enough to make that container scroll.

start: 'bottom' option does not work.

Has anyone ever been able to use this option, start: 'bottom'?

Options as:

color: '#CCC',
height: '400px',
distance: '0',
alwaysVisible: 'true',
touchScrollStep : 50,

works well...... but start: 'bottom' not working.

  • thanks for the help.

Double slimscrolls

Hello, I'm getting double scroll bars on 1.1.0 version

image

I'm using the slimscroll directive which works fine and the extra bar is <div class="slimScrollBar"> and it seems it is the default wrapper element. Could you please advise if I need to upgrade to the latest version (1.1.3) or is there any idea? Thanks

Use slimscroll in combination with ui router

How do I use this directive and slimscroll in combination with ui router?

As it stands now when I go to a different state using an ui-sref inside a slimsrolled div the page is blocked from scrolling entirely in the new state.

Version info:

Angular:                   1.3.15
ui-router:                 0.2.13
jQuery:                    1.11.2
slimscroll:                1.3.2
angular-slimscroll:        latest

template (simplified):

<div class="scroll-body" slimscroll="{height: 250}">
    <a ui-sref="base.cases.detail({ id: mycase.id })">{{ mycase.id }}</a>
</div>

allowPageScroll is not working???

hi, i try to add slimscroll="{allowPageScroll:true}" prop to options but not working until setting noWatch prop to true:( slimscroll="{allowPageScroll:true,noWatch:true}"
can u check it for me??

i changed and tried it with original silmscroll example page(allow-page-scroll.html)

Options do not work

The options which i put doesnt seem to take any effect on the slimscroll. The touch responsize is very bad too

Does not work

I'm getting this error:
TypeError: undefined is not a function
at refresh (http://localhost:9000/assets/javascripts/app/directives.js:249:30)
at init (http://localhost:9000/assets/javascripts/app/directives.js:254:21)
at link (http://localhost:9000/assets/javascripts/app/directives.js:278:17)
at nodeLinkFn (http://localhost:9000/assets/javascripts/lib/angular/angular-1.2.27.js:6736:13)
at compositeLinkFn (http://localhost:9000/assets/javascripts/lib/angular/angular-1.2.27.js:6130:13)
at compositeLinkFn (http://localhost:9000/assets/javascripts/lib/angular/angular-1.2.27.js:6133:13)
at compositeLinkFn (http://localhost:9000/assets/javascripts/lib/angular/angular-1.2.27.js:6133:13)
at compositeLinkFn (http://localhost:9000/assets/javascripts/lib/angular/angular-1.2.27.js:6133:13)
at nodeLinkFn (http://localhost:9000/assets/javascripts/lib/angular/angular-1.2.27.js:6730:24)
at compositeLinkFn (http://localhost:9000/assets/javascripts/lib/angular/angular-1.2.27.js:6130:13)

and lines 249 thru 278 of your directive are these lines:

line 249=> $($elem).slimScroll({ destroy: true });
$($elem).slimScroll(option);
};
var init = function () {
line 254=> refresh();
if ($attr.slimscroll && !option.noWatch) {
off.push($scope.$watchCollection($attr.slimscroll, refresh));
}
if ($attr.slimscrollWatch) {
off.push($scope.$watchCollection($attr.slimscrollWatch, refresh));
}
if ($attr.slimscrolllistento) {
off.push($scope.$on($attr.slimscrolllistento, refresh));
}
};
var destructor = function () {
$($elem).slimScroll({ destroy: true });
off.forEach(function (unbind) {
unbind();
});
off = null;
};
off.push($scope.$on('$destroy', destructor));
line 278= > init();

Is this the correct HTML syntax to call the directive:


{{ someTextHere || 'nuttin here' }}



If not can you please provide a sample syntax of calling the directive?
Thank you
Gary

customization is not working

i am using this
<div class="scroll-body" slimscroll="{width: '80px'}" > for custom height but it is not working it is taking its default height

Disable angular-slimscroll

Angular-slimscroll can be easily added via this:

<div slimscroll="{slimscrollOption: value}">
    Scroll Content
</div>

But on certain cases I need to disable or remove it. How can that be done?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.