增加点操作模式

This commit is contained in:
mkwiser
2014-09-13 16:52:51 +08:00
parent 5b99910dba
commit 652def4600
14 changed files with 597 additions and 83 deletions

47
demo/css/editor.css Normal file
View File

@@ -0,0 +1,47 @@
* {
margin: 0;
padding: 0;
}
ul {
list-style: none;
}
a {
color: #03C;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
.hide {
display: none;
}
body,
html {
height: 100%;
}
#render-view {
font-size: 12px;
width: 100%;
height: 100%;
position: relative;
-webkit-text-size-adjust: none;
}
#render-view .editor-contextmenu {
width: 120px;
border: 1px solid #999;
background: #FEFEFE;
line-height: 24px;
padding: 0 4px;
box-shadow: 1px 1px 1px #CCC;
}
#render-view .editor-contextmenu div {
padding-left: 10px;
cursor: pointer;
border-bottom: 1px solid #CCC;
}
#render-view .editor-contextmenu div:hover {
background: #EEE;
}
#render-view .editor-contextmenu div:last-child {
border-bottom: none;
}

37
demo/css/editor.less Normal file
View File

@@ -0,0 +1,37 @@
@import './reset';
body, html {
height: 100%;
}
#render-view {
font-size: 12px;
width: 100%;
height: 100%;
position: relative;
-webkit-text-size-adjust: none;
.editor-contextmenu {
width: 120px;
border: 1px solid #999;
background: #FEFEFE;
line-height: 24px;
padding: 0 4px;
box-shadow: 1px 1px 1px #CCC;
div {
padding-left: 10px;
cursor: pointer;
border-bottom: 1px solid #CCC;
}
div:hover {
background: #EEE;
}
div:last-child {
border-bottom: none;
}
}
}

View File

@@ -5,7 +5,7 @@
<title>测试render</title>
<script src="./lib/esl.js"></script>
<script src="./lib/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="./css/render.css">
<link rel="stylesheet" type="text/css" href="./css/editor.css">
<style id="font-face"></style>
</head>
<body>
@@ -19,7 +19,7 @@
define('jquery', $);
</script>
<div id="render-view" class="render-view"></div>
<div id="render-view" class="render-view" oncontextMenu="return false"></div>
<script>
require(['demo/editor']);