Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kityminder-core
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
吴志俊
kityminder-core
Commits
7c060bf0
Commit
7c060bf0
authored
Feb 14, 2014
by
campaign
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
6475e1bc
1566b267
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
40 additions
and
56 deletions
+40
-56
configure.js
configure.js
+1
-1
dev.php
dist/dev.php
+1
-1
background.js
src/module/background.js
+0
-53
dropfile.js
src/module/dropfile.js
+37
-0
kityminder.css
themes/default/_css/kityminder.css
+1
-1
grid.png
themes/default/images/grid.png
+0
-0
No files found.
configure.js
View file @
7c060bf0
window
.
KITYMINDER_CONFIG
=
{
//定义工具栏
toolbars
:
[
'hand | undo redo |
layoutstyle |
bold italic | fontfamily fontsize forecolor | saveto'
'hand | undo redo | bold italic | fontfamily fontsize forecolor | saveto'
]
//设置主题
...
...
dist/dev.php
View file @
7c060bf0
...
...
@@ -16,7 +16,6 @@ $dependency = Array(
,
'src/core/keymap.js'
,
'src/core/minder.lang.js'
,
'src/core/minder.defaultoptions.js'
,
'src/module/background.js'
,
'src/module/history.js'
,
'src/module/icon.js'
,
'src/module/layout.js'
...
...
@@ -24,6 +23,7 @@ $dependency = Array(
,
'src/module/layout.bottom.js'
,
'src/core/minder.select.js'
,
'src/module/draggable.js'
,
'src/module/dropfile.js'
,
'src/module/keyboard.js'
,
'src/module/mouse.js'
,
'src/module/history.js'
...
...
src/module/background.js
deleted
100644 → 0
View file @
6475e1bc
var
Grid
=
kity
.
createClass
(
'Grid'
,
{
base
:
kity
.
Rect
,
constructor
:
function
(
x
,
y
,
width
,
height
,
gridSize
,
color1
,
color2
)
{
this
.
color1
=
color1
||
'white'
;
this
.
color2
=
color2
||
'lightgray'
;
this
.
gridSize
=
gridSize
;
this
.
callBase
(
width
,
height
,
x
,
y
);
this
.
draw
();
},
draw
:
function
()
{
var
me
=
this
;
function
lazyDraw
()
{
var
paper
=
me
.
getPaper
();
if
(
!
paper
)
{
return
setTimeout
(
lazyDraw
,
100
);
}
var
size
=
me
.
gridSize
;
me
.
fill
(
new
kity
.
PatternBrush
().
pipe
(
function
()
{
this
.
setX
(
0
).
setY
(
0
);
this
.
setWidth
(
size
*
2
).
setHeight
(
size
*
2
);
this
.
addShape
(
new
kity
.
Rect
(
size
,
size
).
fill
(
me
.
color1
)
);
this
.
addShape
(
new
kity
.
Rect
(
size
,
size
,
size
,
size
).
fill
(
me
.
color1
)
);
paper
.
addResource
(
this
);
}
)
).
setOpacity
(
0
).
fadeIn
(
500
,
'ease'
);
}
lazyDraw
();
}
}
);
KityMinder
.
registerModule
(
'Background'
,
function
()
{
function
initBackground
()
{
var
start
=
kity
.
Color
.
createHSL
(
200
,
8
,
30
);
var
end
=
start
.
dec
(
'l'
,
5
);
var
paper
=
this
.
getPaper
();
var
grid
=
new
Grid
(
-
50000
,
-
50000
,
100000
,
100000
,
2
,
start
,
end
);
paper
.
addShape
(
grid
);
grid
.
bringBack
();
paper
.
setStyle
(
'background'
,
end
.
toString
()
);
}
function
resetBackground
()
{
}
return
{
events
:
{
'ready'
:
initBackground
,
'resize'
:
resetBackground
}
};
}
);
\ No newline at end of file
src/module/dropfile.js
0 → 100644
View file @
7c060bf0
KityMinder
.
registerModule
(
"DropFile"
,
function
()
{
function
init
()
{
var
container
=
this
.
getPaper
().
getContainer
();
container
.
addEventListener
(
'dragover'
,
onDragOver
);
container
.
addEventListener
(
'drop'
,
onDrop
.
bind
(
this
)
);
}
function
onDragOver
(
e
)
{
e
.
preventDefault
();
e
.
stopPropagation
();
e
.
dataTransfer
.
dropEffect
=
'copy'
;
}
function
onDrop
(
e
)
{
e
.
preventDefault
();
e
.
stopPropagation
();
var
minder
=
this
;
if
(
e
.
dataTransfer
.
files
)
{
var
reader
=
new
FileReader
();
reader
.
onload
=
function
()
{};
var
data
=
readFile
(
e
.
dataTransfer
.
files
[
0
]
);
minder
.
importData
(
data
);
}
}
function
readFile
(
e
)
{
var
reader
=
new
FileReader
();
return
reader
.
readAsText
();
}
return
{
events
:
{
ready
:
init
}
};
}
);
\ No newline at end of file
themes/default/_css/kityminder.css
View file @
7c060bf0
...
...
@@ -15,7 +15,7 @@
box-shadow
:
3px
3px
8px
rgba
(
0
,
0
,
0
,
.5
);
}
.kmui-container
.kmui-editor-body
{
background
-color
:
#333
;
background
:
rgb
(
50
,
60
,
61
)
url(../images/grid.png)
repeat
;
line-height
:
0
;
overflow
:
hidden
;
}
...
...
themes/default/images/grid.png
0 → 100644
View file @
7c060bf0
947 Bytes
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment