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

Bugs with Draggabilly #214

Open
fancyDevelopment opened this issue Jul 9, 2017 · 3 comments
Open

Bugs with Draggabilly #214

fancyDevelopment opened this issue Jul 9, 2017 · 3 comments

Comments

@fancyDevelopment
Copy link

I think I found two bugs regarding the usage of the draggabilly library:

  1. If I add the draggabilly library to my project it throws an error in the browser console. As far as I invesitaged this issue it is caused by a compilation or typing issue. The problem ist line number 10 in the mdDateTimePicker.js file (located in dist/js). There the factory is called with global.draggabilly but insead it should be global.Draggabilly because the capitalized Draggabilly constructor function.

  2. As soon as I activate the autoClose option, the draggabilly support is gone. I have no Idea up to now what's the reason for this bug.

Regards,
Daniel

@puranjayjain
Copy link
Owner

@fancyDevelopment this seems to be an ongoing problem which was addressed in multiple bug fixes. I will investigate further on this. The problem seems to stem from the draggability library and its bundling.

I would also require more information on how you are using the project i.e. how you import, any bundlers etc.

@fancyDevelopment
Copy link
Author

fancyDevelopment commented Jul 10, 2017

Basically I am using Fabricator to build up a ui toolkit for my project. Within the fabricator template I use gulp to concat all used libraries and my own JavaScript code. The following Code snippet shows my gulp task for this. I am using the standard gulp plugins for this:

gulp.src([config.src.scripts.vendor + 'jquery/dist/jquery.js',
   config.src.scripts.vendor + 'materialize-css/dist/js/materialize.js',
   config.src.scripts.vendor + 'wowjs/dist/wow.js',
   config.src.scripts.vendor + 'd3/build/d3.js', 
   config.src.scripts.vendor + 'swiper/dist/js/swiper.js',
   config.src.scripts.vendor + 'moment/moment.js',
   config.src.scripts.vendor + 'moment/locale/de.js',
   config.src.scripts.vendor + 'draggabilly/dist/draggabilly.pkgd.js',
   //config.src.scripts.vendor + 'md-date-time-picker/dist/js/mdDateTimePicker.js',
   config.src.scripts.dateTimePicker,
   config.src.scripts.toolkit])
   .pipe(sourcemaps.init())
      .pipe(concat('toolkit.js'))
      .pipe(gulp.dest(config.dest + '/assets/toolkit/scripts')) // save .js
      .pipe(uglify())
      .pipe(rename({ extname: '.min.js'}))
   .pipe(sourcemaps.write('maps'))
   .pipe(gulp.dest(config.dest + '/assets/toolkit/scripts'));
});

In the gulp task config.src.scripts.vendor is the path to the node_modules folder. The path to the date time picker is commented out because I copied the code in a new file, fixed the issue as stated in my first post under 1 and importing this code into my bundle.

If you need any other information please let me know!

@fmntf
Copy link

fmntf commented Sep 26, 2017

Hi. I've got the same issue, draggabilly does not work if autoClose is enabled.
Is this still a work in progress? Thank you!

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

No branches or pull requests

3 participants