Преглед изворни кода

Merge branch 'master' of git.superglue.it:superglue/editor

Michael пре 10 година
родитељ
комит
1cda0feb45

+ 3 - 0
src/allplatforms/classes/TextEditor.js

@@ -171,6 +171,9 @@ SC.loadPackage({ 'TextEditor': {
                 textShapeToolbar.addEventListener('mousedown', function(evt) {
                     evt.stopPropagation();
                 });
+                textShapeToolbar.addEventListener('mouseup', function(evt) {
+                    evt.stopPropagation();
+                });
 
                 this.get('textEditorContainer').appendChild(textShapeToolbar);
 

+ 3 - 6
src/allplatforms/classes/WidthMarkers.js

@@ -73,9 +73,9 @@ SC.loadPackage({ 'WidthMarkers': {
                             self.get('markerRight').classList.add('sg-editing-width-marker-right-visible');
                         }
 
-                        self.get('markerLeft').querySelector('.sg-editing-width-marker-left-triangle').style.top = evt.pageY;
-                        self.get('markerRight').querySelector('.sg-editing-width-marker-right-triangle').style.top = evt.pageY;
-                        
+                        self.get('markerLeft').querySelector('.sg-editing-width-marker-left-triangle').style.top = evt.pageY + 'px';
+                        self.get('markerRight').querySelector('.sg-editing-width-marker-right-triangle').style.top = evt.pageY + 'px';
+
                     },
                     onMouseOut = function(evt){
                         if(!self.get('visible')){
@@ -168,9 +168,6 @@ SC.loadPackage({ 'WidthMarkers': {
                             }});
                         }
 
-                        self.get('markerLeft').querySelector('.sg-editing-width-marker-left-triangle').style.top = evt.pageY;
-                        self.get('markerRight').querySelector('.sg-editing-width-marker-right-triangle').style.top = evt.pageY;
-
                         evt.stopPropagation();
                         evt.preventDefault();
                     };

+ 12 - 10
src/allplatforms/css/WidthMarkers.css

@@ -12,10 +12,11 @@
 
 #sg-editing-width-marker-left .sg-editing-width-marker-left-triangle {
 	position: absolute;
-	left: 2px;
-	width: 40px;
-	height: 40px;
-	background-color: #00ff00;
+	margin-top: 	-15px;
+	left: 13px;
+	border-style: 	solid;
+	border-width: 	15px 0 15px 15px;
+	border-color: 	transparent transparent transparent rgb(255, 41, 61);
 	display: none;
 }
 
@@ -31,10 +32,11 @@
 
 #sg-editing-width-marker-right .sg-editing-width-marker-right-triangle {
 	position: absolute;
-	right: 2px;
-	width: 40px;
-	height: 40px;
-	background-color: #00ff00;
+	margin-top: 	-15px;
+	right: 13px;
+	border-style: 	solid;
+	border-width: 	15px 15px 15px 0;
+	border-color: 	transparent rgb(255, 41, 61) transparent transparent;
 	display: none;
 }
 
@@ -42,7 +44,7 @@
 	border-right: 2px dashed rgb(255, 41, 61);
 }
 
-.sg-editing-width-marker-left-visible .sg-editing-width-marker-left-triangle {
+#sg-editing-width-marker-left.sg-editing-width-marker-left-visible .sg-editing-width-marker-left-triangle {
 	display: block;
 }
 
@@ -50,6 +52,6 @@
 	border-left: 2px dashed rgb(255, 41, 61);
 }
 
-.sg-editing-width-marker-right-visible .sg-editing-width-marker-right-triangle {
+#sg-editing-width-marker-right.sg-editing-width-marker-right-visible .sg-editing-width-marker-right-triangle {
 	display: block;
 }

+ 16 - 0
src/allplatforms/css/icons/newPage.svg

@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+	 width="30px" height="30px" viewBox="0 0 30 30" enable-background="new 0 0 30 30" xml:space="preserve">
+<g>
+	<path fill="none" d="M24,7H6v4h18V7z M9,10H7V8h2V10z M12,10h-2V8h2V10z M13,10V8h2v2H13z"/>
+	<rect x="6" y="13" fill="none" width="18" height="10"/>
+	<g>
+		<rect x="13" y="8" fill="#FFFFFF" width="2" height="2"/>
+		<rect x="10" y="8" fill="#FFFFFF" width="2" height="2"/>
+		<rect x="7" y="8" fill="#FFFFFF" width="2" height="2"/>
+		<path fill="#FFFFFF" d="M26,5H4v20h22V5z M6,7h18v4H6V7z M24,23H6V13h18V23z"/>
+	</g>
+</g>
+</svg>