 			@__matrix = matrix
 			@style.webkitTransform = @__matrix.matrix().cssValues()
 	
-	# @private
 	_computedMatrix: ->
 		new WebKitCSSMatrix @computedStyle.webkitTransform
 

			return if value is @_superView
			
			# Cancel previous pending insertions
			document.removeEventListener "DOMContentLoaded", @__insertElement
			
			# Remove from previous superview subviews
			if @_superView

{Frame} = require "../primitives/frame"
{Matrix} = require "../primitives/matrix"

{EventEmitter} = require "../eventemitter"
{Animation} = require "../animation"

exports.ViewList = []


class View extends Frame
	
	constructor: (args) ->
		
		args ?= {}
		
		# Keep a generic list of all current views
		View.Views.push @
		@id = View.Views.length
		
		# Create the html element for this view
		@_element = document.createElement "div"
		@_element.id = @id
		
		# Add the default css
		@addClass "framer"
		
		@_subViews = []
		@_currentAnimations = []
		
		# Set the view properties
		@clip = args.clip or View.Properties.clip
		@properties = args
		
		# Overridable creation hook
		@_postCreate?()
		
		if not args.superView
			@_insertElement()
	

	_postCreate: ->
	
	# Helpers
	
	@define "name",
		get: ->
			@_name or @id
