Bug WISE-22 fixed. Resolve resize node issue.
This commit is contained in:
Paulo Gustavo Veiga 2014-01-12 02:17:42 -03:00 committed by Paulo Veiga
parent a2db34ae61
commit 63c063933d
2 changed files with 6 additions and 34 deletions

View File

@ -1,32 +0,0 @@
#!/bin/bash
set -e
set -u
WISE_VERSION=$1
TMP_DIR=/tmp/wise-src/wisemapping-src
TAR_FILE_NAME=wisemapping-${WISE_VERSION}-src.tar.gz
OUTPUT_DIR=`pwd`"/target"
OUTPUT_FILE=${OUTPUT_DIR}/${TAR_FILE_NAME}
# Clean all.
cd ..
rm -rf ${TMP_DIR}/../
mvn clean
# Prepare copy
mkdir -p ${TMP_DIR}
rsync -aCv --exclude ".git" --exclude "wisemapping.i*" --exclude "**/*/Brix*" --exclude "**/brix" --exclude "*/*.iml" --exclude "*/wisemapping.log*" --exclude "**/.DS_Store" --exclude "*.textile" --exclude "**/.gitignore" --exclude "installer" --exclude "*/target" . ${TMP_DIR}
# Zip file
[ ! -e ${OUTPUT_DIR} ] && mkdir ${OUTPUT_DIR}
rm -f ${OUTPUT_FILE}
cd ${TMP_DIR}/..
tar -cvzf ${OUTPUT_FILE} .
echo
echo "#################################################################"
echo "Zip file generated on:"${OUTPUT_FILE}
echo "#################################################################"

View File

@ -156,16 +156,20 @@ web2d.peer.svg.TextPeer = new Class({
var computedWidth; var computedWidth;
// Firefox hack for this issue:http://stackoverflow.com/questions/6390065/doing-ajax-updates-in-svg-breaks-getbbox-is-there-a-workaround // Firefox hack for this issue:http://stackoverflow.com/questions/6390065/doing-ajax-updates-in-svg-breaks-getbbox-is-there-a-workaround
try { try {
computedWidth = this._native.getBBox().width; computedWidth = this._native.getBBox().width;
// Chrome bug is producing this error, oly during page loading. Remove the hack if it works. The issue seems to be // Chrome bug is producing this error, oly during page loading. Remove the hack if it works. The issue seems to be
// caused when the element is hidden. // caused when the element is hidden. I don't know why, but it works ...
if(computedWidth==0){ if(computedWidth==0){
computedWidth = getBoundingClientRect().width - 35; var bbox = this._native.getBBox();
computedWidth = bbox.width;
} }
} catch(e) { } catch(e) {
computedWidth = 10; computedWidth = 10;
} }
console.log("Final result:"+computedWidth);
var width = parseInt(computedWidth); var width = parseInt(computedWidth);
width = width + this._font.getWidthMargin(); width = width + this._font.getWidthMargin();