<commit_before>function QuestionLibraryDirective($restApi) {
    return {
        templateUrl: staticFilesUri + 'templates/QuestionLibrary.Directive.Template.html',
        scope: {
            clickHandler: '&',
            currentItem: '='
        },
        link: function (scope, element) {
            var sort_ul = element.find('ul');

            $restApi.create_question_api(scope).list();
            scope.handle_click = function (item) {
                scope.clickHandler({ item: item});
            };
            scope.hide_library_popup = function () {
                scope.$parent.displayQlib = false;
            };

            scope.set_item = function (item) {
                scope.currentItem = item;
            };

            sort_ul.sortable({
                items: "> li",
                connectWith: ".survey-editor__list"
            });
        }
    };
}<commit_msg>#975 - Questions being dragged from question library 'disappear' while being dragged<commit_after>function QuestionLibraryDirective($restApi) {
    return {
        templateUrl: staticFilesUri + 'templates/QuestionLibrary.Directive.Template.html',
        scope: {
            clickHandler: '&',
            currentItem: '='
        },
        link: function (scope, element) {
            var sort_ul = element.find('ul');

            $restApi.create_question_api(scope).list();
            scope.handle_click = function (item) {
                scope.clickHandler({ item: item});
            };
            scope.hide_library_popup = function () {
                scope.$parent.displayQlib = false;
            };

            scope.set_item = function (item) {
                scope.currentItem = item;
            };

            sort_ul.sortable({
                items: "> li",
                connectWith: ".survey-editor__list",
                helper: 'clone',
                start: function () {
                    sort_ul.find('li:hidden').show();
                }
            });
        }
    };
}
{'fraction_non_alphanumeric': 0.11717974180734857, 'fraction_numerical': 0.0014895729890764648, 'mean_word_length': 1.5219023779724656, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7314626', 'n_tokens_mistral': 526, 'n_tokens_neox': 501, 'n_words': 89}