Sha256: d3cf4468e329ac9a7d9a8013ccf82f848833c86d9fa924e5b1ff9e0e78a34b11

Contents?: true

Size: 1.27 KB

Versions: 7

Compression:

Stored size: 1.27 KB

Contents

//= require_self

//= require ./editor/models/generated_image_file
//= require_tree ./editor/models
//= require_tree ./editor/collections
//= require_tree ./editor/routers
//= require_tree ./editor/controllers
//= require_tree ./editor/templates
//= require_tree ./editor/views
//= require_tree ./editor/patterns

//= require ./editor/config

pageflow.linkmapPage = pageflow.linkmapPage || {};

pageflow.linkmapPage.areaTypesFor = function(pageConfiguration) {
  return new Backbone.Collection(_([
    pageflow.linkmapPage.PageLinkAreaType,
    pageflow.linkmapPage.AudioFileAreaType,
    pageflow.linkmapPage.ExternalLinkAreaType,
    pageflow.linkmapPage.TextOnlyAreaType
  ]).map(function(constructor) {
    return new constructor({}, {
      pageConfiguration: pageConfiguration
    });
  }));
};

pageflow.linkmapPage.selectArea = function(page, options) {
  options = options || {};

  pageflow.entry.unset('emulation_mode');

  return $.Deferred(function(deferred) {
    pageflow.linkmapPage.currentAreaSelection = _.extend(options, {
      deferred: deferred
    });

    var path = 'linkmap_pages/' + page.id + '/select_area_position' +
      (options.areaIndex !== undefined ? '?area=' + options.areaIndex : '');

    pageflow.editor.navigate(path, {trigger: true});
  }).promise();
};

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
pageflow-linkmap-page-2.10.0 app/assets/javascript/pageflow/linkmap_page/editor.js
pageflow-linkmap-page-2.9.0 app/assets/javascript/pageflow/linkmap_page/editor.js
pageflow-linkmap-page-2.8.0 app/assets/javascript/pageflow/linkmap_page/editor.js
pageflow-linkmap-page-2.7.1 app/assets/javascript/pageflow/linkmap_page/editor.js
pageflow-linkmap-page-2.7.0 app/assets/javascript/pageflow/linkmap_page/editor.js
pageflow-linkmap-page-2.6.1 app/assets/javascript/pageflow/linkmap_page/editor.js
pageflow-linkmap-page-2.6.0 app/assets/javascript/pageflow/linkmap_page/editor.js