Commit fb0045d1 authored by Matt Crinklaw-Vogt's avatar Matt Crinklaw-Vogt
Browse files

Author tags. Slide preview drawing.

parent 0267c38a
Showoff - An ImpressJS Authoring Tool / An ImpreeJS GUI
Copyright (c) 2012 Tantaman LLC
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
\ No newline at end of file
###
@author Matt Crinklaw-Vogt
###
define(() ->
class LinkedList
constructor: () ->
......
###
@author Matt Crinklaw-Vogt
###
requirejs.config({
"packages": ["ui/editor", "model/presentation"],
paths: {
......
###
@author Matt Crinklaw-Vogt
###
define(["common/EventEmitter",
"common/collections/LinkedList"],
(EventEmitter, LinkedList) ->
......
###
@author Matt Crinklaw-Vogt
###
define(["vendor/backbone"],
(Backbone) ->
fontSettings = [
......
###
@author Matt Crinklaw-Vogt
###
define(["vendor/backbone"]
(Backbone) ->
Backbone.Model.extend(
......
###
@author Matt Crinklaw-Vogt
###
define(["vendor/backbone", "./SlideCollection",
"./Slide",
"model/common_application/UndoHistory"],
......
###
@author Matt Crinklaw-Vogt
###
define(["model/geom/SpatialObject"],
(SpatialObject) ->
SpatialObject.extend(
......@@ -14,14 +17,20 @@ define(["model/geom/SpatialObject"],
@attributes.components.push(component)
component.on("dispose", @remove, @)
component.on("change:selected", @selectionChanged, @)
component.on("change", @componentChanged, @)
@trigger("change")
@trigger("change:components.add", @, component)
remove: (component) ->
idx = @attributes.components.indexOf(component)
if idx != -1
@attributes.components.splice(idx, 1)
@trigger("change")
@trigger("change:components.remove", @, component)
componentChanged: () ->
@trigger("change")
unselectComponents: () ->
if @_lastSelection
@_lastSelection.set("selected", false)
......
###
@author Matt Crinklaw-Vogt
###
define(["vendor/backbone", "./Slide"],
(Backbone, Slide) ->
Backbone.Collection.extend(
......
###
@author Matt Crinklaw-Vogt
###
define(["model/geom/SpatialObject"],
(SpatialObject) ->
SpatialObject.extend(
......
###
@author Matt Crinklaw-Vogt
###
define(["./Image",
"./Table",
"./TextBox"],
......
###
@author Matt Crinklaw-Vogt
###
define(["./Component"],
(Component) ->
Component.extend(
......
###
@author Matt Crinklaw-Vogt
###
define(["./Deck"],
(Deck) ->
{
......
###
@author Matt Crinklaw-Vogt
###
define(["common/MapResolver"],
(MapResolver) ->
stateMap =
......
###
@author Matt Crinklaw-Vogt
###
define(["vendor/backbone",
"./SlideEditor",
"./TransitionEditor",
......@@ -23,7 +26,7 @@ define(["vendor/backbone",
Backbone.View.extend(
className: "editor"
events:
"click > .navbar .dropdown-menu > li": "menuItemSelected"
"click .menuBar .dropdown-menu > li": "menuItemSelected"
initialize: () ->
@id = editorId++
......
###
@author Matt Crinklaw-Vogt
###
define(["vendor/backbone", "./Templates",
"./components/ComponentViewFactory",
"css!./res/css/OperatingTable.css"],
......
###
@author Matt Crinklaw-Vogt
###
define(["vendor/backbone", "./Templates",
"./SlidePreviewPanel",
"./OperatingTable",
......
###
@author Matt Crinklaw-Vogt
###
define(["vendor/backbone",
"./SlideSnapshot",
"css!./res/css/slidePreviewPanel.css"],
......
###
@author Matt Crinklaw-Vogt
###
define(["vendor/backbone",
"./Templates",
"css!./res/css/SlideSnapshot"],
(Backbone, Templates, empty) ->
"css!./res/css/SlideSnapshot",
"./raster/SlideDrawer"],
(Backbone, Templates, empty, SlideDrawer) ->
Backbone.View.extend(
className: "slideSnapshot"
events:
"hoverin": "hoverin"
"hoverout": "hoverout"
"click": "clicked"
"click .removeBtn": "removeClicked"
initialize: () ->
hoverin: () ->
hoverout: () ->
clicked: () ->
@trigger("clicked", @)
......@@ -23,8 +21,16 @@ define(["vendor/backbone",
@trigger("removeClicked", @)
e.stopPropagation()
remove: () ->
@slideDrawer.dispose()
Backbone.View.prototype.remove.apply(@, arguments)
render: () ->
if @slideDrawer?
@slideDrawer.dispose()
@$el.html(Templates.SlideSnapshot(@model.attributes))
g2d = @$el.find("canvas")[0].getContext("2d")
@slideDrawer = new SlideDrawer(@model, g2d)
@$el
)
)
\ No newline at end of file
###
@author Matt Crinklaw-Vogt
###
define(["vendor/backbone"],
(Backbone) ->
Backbone.View.extend(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment